001/*
002 * jPOS Project [http://jpos.org]
003 * Copyright (C) 2000-2026 jPOS Software SRL
004 *
005 * This program is free software: you can redistribute it and/or modify
006 * it under the terms of the GNU Affero General Public License as
007 * published by the Free Software Foundation, either version 3 of the
008 * License, or (at your option) any later version.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
013 * GNU Affero General Public License for more details.
014 *
015 * You should have received a copy of the GNU Affero General Public License
016 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
017 */
018
019package org.jpos.q2.iso;
020
021/**
022 * MBean interface.
023 * @author Alwyn Schoeman
024 * @version $Revision: 2072 $ $Date: 2004-12-07 08:21:24 -0300 (Tue, 07 Dec 2004) $
025 */
026public interface QServerMBean extends org.jpos.q2.QBeanSupportMBean {
027
028  /**
029   * Sets the TCP port the server listens on.
030   *
031   * @param port TCP port number
032   */
033  void setPort(int port) ;
034
035  /**
036   * Returns the configured listen port.
037   *
038   * @return TCP port number
039   */
040  int getPort() ;
041
042  /**
043   * Sets the fully qualified packager class name used by accepted channels.
044   *
045   * @param packager packager class name
046   */
047  void setPackager(java.lang.String packager) ;
048
049  /**
050   * Returns the configured packager class name.
051   *
052   * @return packager class name
053   */
054  java.lang.String getPackager() ;
055
056  /**
057   * Sets the fully qualified channel class name instantiated for each accepted connection.
058   *
059   * @param channel channel class name
060   */
061  void setChannel(java.lang.String channel) ;
062
063  /**
064   * Returns the configured channel class name.
065   *
066   * @return channel class name
067   */
068  java.lang.String getChannel() ;
069
070  /**
071   * Sets the maximum number of concurrent client sessions accepted by the server.
072   *
073   * @param maxSessions maximum sessions
074   */
075  void setMaxSessions(int maxSessions) ;
076
077  /**
078   * Returns the configured maximum number of concurrent client sessions.
079   *
080   * @return maximum sessions
081   */
082  int getMaxSessions() ;
083
084  /**
085   * Sets the fully qualified socket-factory class name used to create the server socket.
086   *
087   * @param sFactory socket factory class name
088   */
089  void setSocketFactory(java.lang.String sFactory) ;
090
091  /**
092   * Returns the configured socket-factory class name.
093   *
094   * @return socket factory class name
095   */
096  java.lang.String getSocketFactory() ;
097  /**
098   * Returns the names of all currently-active accepted channels, comma-separated.
099   *
100   * @return comma-separated active channel names
101   */
102  String getISOChannelNames();
103  /**
104   * Returns aggregated counters across all active channels.
105   *
106   * @return counter snapshot suitable for diagnostics
107   */
108  String getCountersAsString ();
109  /**
110   * Returns counters for a single named accepted channel.
111   *
112   * @param isoChannelName accepted channel's name
113   * @return counter snapshot suitable for diagnostics, or empty if the channel is unknown
114   */
115  String getCountersAsString (String isoChannelName);
116}