Class ConnectionManager

    • Field Detail

      • logger

        private static final Logger logger
        logger
      • DEBUG

        private static final boolean DEBUG
      • MULTI_CNX_SYNC

        public static final String MULTI_CNX_SYNC
        Name of property allowing to activate the synchronization mode of multiples connections.

        This mode allows to pack commands that occurs in a same time in order to minimize the number of transactions.

        This property can be fixed either from java launching command or a3servers.xml configuration file.

        See Also:
        Constant Field Values
      • multiCnxSync

        private static boolean multiCnxSync
        True if the synchronization mode is activated.
      • MULTI_CNX_SYNC_DELAY

        public static final String MULTI_CNX_SYNC_DELAY
        Name of property allowing to configure the synchronization mode of multiples connections.

        This property allows to define the duration of instant to pack the commands.

        This property can be fixed either from java launching command or a3servers.xml configuration file.

        See Also:
        Constant Field Values
      • multiThreadSyncDelay

        private static long multiThreadSyncDelay
        Duration in ms of instant to pack the commands.
      • CTRLFLOW_THRESHOLD

        public static final String CTRLFLOW_THRESHOLD
        Name of property allowing to define the threshold beyond which the flow-control of incoming messages is activated. Default value is 25.

        This property can be fixed either from java launching command or a3servers.xml configuration file.

        See Also:
        Constant Field Values
      • ctrlFlowThreshold

        private static int ctrlFlowThreshold
        Threshold beyond which the flow-control of incoming messages is activated.
      • CTRLFLOW_THROUGHPUT

        public static final String CTRLFLOW_THROUGHPUT
        Name of property allowing to define the average throughput of the server for the calculation of flow control. Default value is 100000.

        This property can be fixed either from java launching command or a3servers.xml configuration file.

        See Also:
        Constant Field Values
      • ctrlFlowDelay

        private static long ctrlFlowDelay
        Definition of average delay for the implementation of flow control (it is computed from the CTRLFLOW_THROUGHPUT parameter.
      • directNotification

        private static boolean directNotification
      • activated

        private boolean activated
        true if new connections are accepted.
      • currentInstance

        private static ConnectionManager currentInstance
        Unique ConnectionManager instance.
      • inFlow

        public static final int inFlow
        Limit of incoming messages flow (msgs/s) requested if any, default value is -1 (no limitation). This value can be adjusted by setting ConnectionManager.inFlow property. This property can be fixed either from java launching command, or in a3servers.xml configuration file.
      • version

        public static final String version
    • Constructor Detail

      • ConnectionManager

        public ConnectionManager()
    • Method Detail

      • registerFactories

        public static final void registerFactories()
      • flowControl

        private static void flowControl()
      • getMultiThreadSyncDelay

        public static final long getMultiThreadSyncDelay()
      • init

        public static void init​(String args,
                                boolean firstTime)
                         throws Exception
        Initializes the connection manager as a service. Creates and deploys the administration topic, the connection manager agent and if requested the administration user proxy.
        Parameters:
        args - name and password of the administrator (optional).
        firstTime - true when the agent server starts.
        Throws:
        Exception - Thrown when processing the String argument or in case of a problem when deploying the ConnectionFactory.
      • createIdentity

        private static Identity createIdentity​(String adminName,
                                               String adminPassword,
                                               String identityClassName)
                                        throws Exception
        Create an admin Identity.
        Parameters:
        adminName - Name of the admin.
        adminPassword - Password of the admin.
        identityClassName - identity class name.
        Returns:
        identity admin Identity.
        Throws:
        Exception
      • stopService

        public static void stopService()
        Stops the ConnectionManager service.
      • removeAllManagers

        private void removeAllManagers()
      • getFailedLoginCount

        public int getFailedLoginCount()
        Description copied from interface: ConnectionManagerMBean
        Gets the number of connections rejected due to a failed authentication.
        Specified by:
        getFailedLoginCount in interface ConnectionManagerMBean
        Returns:
        the number of connections rejected due to a failed authentication.
      • checkCredentials

        public boolean checkCredentials​(String userName,
                                        String password)
        Checks the validity of the given name and password.
        Parameters:
        userName - the name of the user
        password - the password of the user
        Returns:
        true if the name and password match an existing user.
      • setActivate

        public static void setActivate​(boolean activate)
        Activates/deactivates the connection manager.
        Parameters:
        activate - true, activates the connection manager.