Class ReliableTcpClient

    • Field Detail

      • logger

        private static final Logger logger
      • DEBUG

        private static final boolean DEBUG
      • statusNames

        protected static final String[] statusNames
      • key

        protected int key
      • status

        private volatile int status
      • reconnect

        private boolean reconnect
        True if the client must try to reconnect in case of connection failure. It depends of cnxPendingTimer on a "normal" TCP connection.
      • reconnectTimeout

        private int reconnectTimeout
        Time in ms during the client try to reconnect to the server. It depends of connectingTimer and cnxPendingTimer from the connection parameters.
      • timer

        private Timer timer
      • CLOCK_SYNCHRO_THRESHOLD

        public static final String CLOCK_SYNCHRO_THRESHOLD
        Name of the property allowing to change the threshold of warning for the verification of the synchronization between the client and server clock. A warning is generated if there is more than this value in milliseconds between the two clocks.

        By default the value is 1000 milliseconds.

        See Also:
        Constant Field Values
      • clockSynchroThreshold

        private long clockSynchroThreshold
        Value of the threshold of warning for the verification of the synchronization between the client and server clock. A warning is generated if there is more than this value in milliseconds between the two clocks.

        By default the value is 1000 milliseconds.

    • Constructor Detail

      • ReliableTcpClient

        public ReliableTcpClient()
    • Method Detail

      • setTimer

        public void setTimer​(Timer timer)
      • setStatus

        private void setStatus​(int status)
      • connect

        public void connect()
                     throws jakarta.jms.JMSException
        Throws:
        jakarta.jms.JMSException
      • connect

        public void connect​(boolean reconnect)
                     throws jakarta.jms.JMSException
        Throws:
        jakarta.jms.JMSException
      • doConnect

        private void doConnect​(String hostname,
                               int port)
                        throws Exception,
                               jakarta.jms.JMSException
        Throws:
        Exception
        jakarta.jms.JMSException
      • throwSecurityError

        private void throwSecurityError​(String info)
                                 throws jakarta.jms.JMSSecurityException
        Throws:
        jakarta.jms.JMSSecurityException
      • waitForReconnection

        private void waitForReconnection()
                                  throws Exception
        Throws:
        Exception
      • close

        public void close()
      • addServerAddress

        public void addServerAddress​(String host,
                                     int port)
      • stopReconnections

        public void stopReconnections()