| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Connection
Represents a 'connection' between two machines. The most important implementation is the
 TcpIpConnection.
| Method Summary | |
|---|---|
|  void | close()Closes this connection. | 
|  Address | getEndPoint()Gets the Addressof the other side of this Connection. | 
|  InetAddress | getInetAddress()Returns remote address of this Connection. | 
|  int | getPort()The remote port. | 
|  InetSocketAddress | getRemoteSocketAddress()Returns the address of the endpoint this Connection is connected to, or nullif it is unconnected. | 
|  ConnectionType | getType()Returns the ConnectionTypeof this Connection. | 
|  boolean | isAlive()Checks if the Connection is still alive. | 
|  boolean | isClient()Checks if it is a client connection. | 
|  long | lastReadTime()Returns the clock time of the most recent read using this connection. | 
|  long | lastWriteTime()Returns the clock time of the most recent write using this connection. | 
|  boolean | write(SocketWritable packet)Writes a SocketWritable packet to the other side. | 
| Method Detail | 
|---|
boolean write(SocketWritable packet)
packet - the packet to write.
NullPointerException - if packet is null.boolean isAlive()
long lastReadTime()
long lastWriteTime()
void close()
ConnectionType getType()
ConnectionType of this Connection.
null is returned.boolean isClient()
InetAddress getInetAddress()
null if the connection is not alive.InetSocketAddress getRemoteSocketAddress()
null if it is unconnected.
Address getEndPoint()
Address of the other side of this Connection.
 
 todo: rename to get remoteAddress?
int getPort()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||