Class TcpConnecter

java.lang.Object
zmq.ZObject
zmq.Own
zmq.io.net.tcp.TcpConnecter
All Implemented Interfaces:
IPollEvents
Direct Known Subclasses:
IpcConnecter, SocksConnecter, TipcConnecter

public class TcpConnecter extends Own implements IPollEvents
  • Field Details

    • RECONNECT_TIMER_ID

      protected static final int RECONNECT_TIMER_ID
      See Also:
    • ioObject

      protected final IOObject ioObject
    • addr

      private final Address addr
    • fd

      private SocketChannel fd
    • handle

      private Poller.Handle handle
    • delayedStart

      protected final boolean delayedStart
    • timerStarted

      private boolean timerStarted
    • session

      private final SessionBase session
    • currentReconnectIvl

      private int currentReconnectIvl
    • socket

      private final SocketBase socket
  • Constructor Details

  • Method Details

    • destroy

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

      protected void processPlug()
      Overrides:
      processPlug in class ZObject
    • 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 IOException
      Throws:
      IOException
    • connect

      private 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 String toString()
      Overrides:
      toString in class Object