Interface INetworkClientManagerInterface

All Known Implementing Classes:
TCPNetworkClientManager

public interface INetworkClientManagerInterface
All network-communication is done through this interface. There are different implementations.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method add a message to be delivered to the client the message is pointed to.
    void
    This method notify the thread to finish it execution
    Returns the ip address and port-number
    boolean
    returns true unless it is sure that we are disconnected.
    getMessage​(int timeout)
    This method returns a Message from the list or block for timeout milliseconds until a message is available or null if timeout happens.
  • Method Details

    • finish

      void finish()
      This method notify the thread to finish it execution
    • getAddress

      InetSocketAddress getAddress()
      Returns the ip address and port-number
      Returns:
      InetSocketAddress
    • getMessage

      Message getMessage(int timeout) throws InvalidVersionException
      This method returns a Message from the list or block for timeout milliseconds until a message is available or null if timeout happens.
      Parameters:
      timeout - timeout time in milliseconds
      Returns:
      a Message or null if timeout happens
      Throws:
      InvalidVersionException
    • addMessage

      void addMessage(Message msg)
      This method add a message to be delivered to the client the message is pointed to.
      Parameters:
      msg - the message to be delivered.
    • getConnectionState

      boolean getConnectionState()
      returns true unless it is sure that we are disconnected.
      Returns:
      true if we may be online