Package arc.net

Interface EndPoint

All Superinterfaces:
Runnable
All Known Implementing Classes:
Client, Server

public interface EndPoint extends Runnable
Represents the local end point of a connection.
  • Method Details

    • addListener

      void addListener(NetListener listener)
      Adds a listener to the endpoint. If the listener already exists, it is not added again.
    • removeListener

      void removeListener(NetListener listener)
    • run

      void run()
      Continually updates this end point until stop() is called.
      Specified by:
      run in interface Runnable
    • start

      void start()
      Starts a new thread that calls run().
    • stop

      void stop()
      Closes this end point and causes run() to return.
    • close

      void close()
      See Also:
    • update

      void update(int timeout) throws IOException
      Throws:
      IOException
      See Also:
    • getUpdateThread

      Thread getUpdateThread()
      Returns the last thread that called update(int) for this end point. This can be useful to detect when long running code will be run on the update thread.