Class Channel

java.lang.Object
marauroa.common.net.Channel

public class Channel extends Object
a connection between client and server
Author:
hendrik
  • Constructor Details

    • Channel

      public Channel()
      creates a new Channel object.
    • Channel

      public Channel(ConnectionManager connectionManager, InetSocketAddress address, Object internalChannel)
      creates a new Channel object.
      Parameters:
      connectionManager - the manager to contact to send anything using this channel
      address - the ip-address and port Oof the other end
      internalChannel - an internal channel object used by the manager
  • Method Details

    • getInternalChannel

      public Object getInternalChannel()
      gets the internal channel
      Returns:
      internal channel
    • getInetAddress

      public InetAddress getInetAddress()
      gets the ip-address of the other end
      Returns:
      InetAddress
    • getInetSocketAddress

      public InetSocketAddress getInetSocketAddress()
      gets the ip-address and port of the other end
      Returns:
      InetSocketAddress
    • getConnectionManager

      public ConnectionManager getConnectionManager()
      gets the connection manager
      Returns:
      connection manager
    • isWaitingForPerception

      public boolean isWaitingForPerception()
      are we waiting for a perception?
      Returns:
      true, if we are waiting for a perception
    • setWaitingForPerception

      public void setWaitingForPerception(boolean waitingForPerception)
      sets the flag indicating whether this connection is waiting for a perception
      Parameters:
      waitingForPerception - waiting for perception
    • toString

      public String toString()
      Overrides:
      toString in class Object