org.elkoserver.foundation.net
Interface Connection

All Known Implementing Classes:
ConnectionBase, HTTPSessionConnection, RTCPSessionConnection, TCPConnection

public interface Connection

A communications connection to other entities on the net.


Method Summary
 void close()
          Shut down the connection.
 int id()
          Identify this connection for logging purposes.
 void sendMsg(Object message)
          Send a message over the connection to whomever is at the other end.
 void setDebugMode(boolean mode)
          Turn debug features for this connection on or off.
 

Method Detail

close

void close()
Shut down the connection. Any queued messages will be sent.


id

int id()
Identify this connection for logging purposes.

Returns:
this connection's ID number.

sendMsg

void sendMsg(Object message)
Send a message over the connection to whomever is at the other end.

Parameters:
message - The message to be sent.

setDebugMode

void setDebugMode(boolean mode)
Turn debug features for this connection on or off.

Parameters:
mode - If true, turn debug mode on; if false, turn it off.