Class DispatchListener

java.lang.Object
com.xpdustry.claj.common.net.DispatchListener
All Implemented Interfaces:
arc.net.NetListener

public class DispatchListener extends Object implements arc.net.NetListener
  • Nested Class Summary

    Nested classes/interfaces inherited from interface arc.net.NetListener

    arc.net.NetListener.LagListener, arc.net.NetListener.QueuedListener, arc.net.NetListener.ThreadedListener
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    boolean
    Whether idle(Connection) calls stop if the connection has stopped to be idle.
    protected arc.net.NetListener[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    DispatchListener(boolean cutIdle)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addListener(arc.net.NetListener listener)
     
    void
    connected(arc.net.Connection connection)
     
    void
    disconnected(arc.net.Connection connection, arc.net.DcReason reason)
     
    arc.net.NetListener[]
     
    void
    idle(arc.net.Connection connection)
     
    void
    received(arc.net.Connection connection, Object object)
     
    void
    removeListener(arc.net.NetListener listener)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • listeners

      protected arc.net.NetListener[] listeners
    • cutIdle

      public boolean cutIdle
      Whether idle(Connection) calls stop if the connection has stopped to be idle.
  • Constructor Details

    • DispatchListener

      public DispatchListener()
    • DispatchListener

      public DispatchListener(boolean cutIdle)
  • Method Details

    • getListeners

      public arc.net.NetListener[] getListeners()
    • addListener

      public void addListener(arc.net.NetListener listener)
    • removeListener

      public void removeListener(arc.net.NetListener listener)
    • connected

      public void connected(arc.net.Connection connection)
      Specified by:
      connected in interface arc.net.NetListener
    • disconnected

      public void disconnected(arc.net.Connection connection, arc.net.DcReason reason)
      Specified by:
      disconnected in interface arc.net.NetListener
    • received

      public void received(arc.net.Connection connection, Object object)
      Specified by:
      received in interface arc.net.NetListener
    • idle

      public void idle(arc.net.Connection connection)
      Specified by:
      idle in interface arc.net.NetListener