Package marauroa.common.net
Class Channel
java.lang.Object
marauroa.common.net.Channel
a connection between client and server
- Author:
- hendrik
-
Constructor Summary
ConstructorDescriptionChannel()
creates a new Channel object.Channel(ConnectionManager connectionManager, InetSocketAddress address, Object internalChannel)
creates a new Channel object. -
Method Summary
Modifier and TypeMethodDescriptiongets the connection managergets the ip-address of the other endgets the ip-address and port of the other endgets the internal channelboolean
are we waiting for a perception?void
setWaitingForPerception(boolean waitingForPerception)
sets the flag indicating whether this connection is waiting for a perceptiontoString()
-
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 channeladdress
- the ip-address and port Oof the other endinternalChannel
- an internal channel object used by the manager
-
-
Method Details
-
getInternalChannel
gets the internal channel- Returns:
- internal channel
-
getInetAddress
gets the ip-address of the other end- Returns:
- InetAddress
-
getInetSocketAddress
gets the ip-address and port of the other end- Returns:
- InetSocketAddress
-
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
-