Class TcpConnecter

    • Field Detail

      • ioObject

        protected final IOObject ioObject
      • fd

        private java.nio.channels.SocketChannel fd
      • delayedStart

        protected final boolean delayedStart
      • timerStarted

        private boolean timerStarted
      • currentReconnectIvl

        private int currentReconnectIvl
    • Method Detail

      • destroy

        protected void destroy()
        Specified by:
        destroy in class Own
      • processTerm

        protected void processTerm​(int linger)
        Overrides:
        processTerm in class Own
      • connectEvent

        public void connectEvent()
        Description copied from interface: IPollEvents
        Called by I/O thread when file descriptor might be ready for connecting.
        Specified by:
        connectEvent in interface IPollEvents
      • timerEvent

        public void timerEvent​(int id)
        Description copied from interface: IPollEvents
        Called when timer expires.
        Specified by:
        timerEvent in interface IPollEvents
        Parameters:
        id - the ID of the expired timer.
      • startConnecting

        private void startConnecting()
      • addReconnectTimer

        private void addReconnectTimer()
      • getNewReconnectIvl

        private int getNewReconnectIvl()
      • open

        private boolean open()
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • connect

        private java.nio.channels.SocketChannel connect()
      • close

        protected void close()
      • inEvent

        public void inEvent()
        Description copied from interface: IPollEvents
        Called by I/O thread when file descriptor is ready for reading.
        Specified by:
        inEvent in interface IPollEvents
      • outEvent

        public void outEvent()
        Description copied from interface: IPollEvents
        Called by I/O thread when file descriptor is ready for writing.
        Specified by:
        outEvent in interface IPollEvents
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object