|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcgl.narada.protocol.ClientConnectionHandler
public class ClientConnectionHandler
This class is responsible for dealing with clients which are connected to a server node. Specifically this class is responsible for
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
ClientConnectionHandler(ProtocolHandler protocolHandler,
int connectionLimit)
Constructor for the Client connection handler |
|
| Method Summary | |
|---|---|
void |
connectionToClientLost(Object clientIdentifier)
|
int |
getConcurrentConnections()
Returns the number of active concurrent connections |
int |
getConcurrentConnectionsLimit()
Returns the limit on the active concurrent connections |
static void |
main(String[] args)
Testing the application |
void |
processClientAddressRequest(String clientNode,
byte[] data)
This method is responsible for handling client address requests and the creation of responses to these clients in response to their address requests |
void |
processClientRegistration(byte[] registerBytes,
String clientNode)
|
void |
routePayloadToEntity(Object clientKey,
byte[] data)
|
void |
sendMessageToClient(int clientId,
String clientNode,
byte[] msg)
Sends the message (msg) to the appropriate client identified by the clientId and clientNode combination |
void |
sendToClientNode(byte[] data,
int destination)
This method provides for routing information for one client connected to the server node. |
void |
sendToClientNodes(byte[] data,
ArrayList destinations,
int ignoreDestination)
This method provides for routing information to clients that are connected to the server node. |
void |
sendToClientNodes(byte[] data,
Hashtable destinations)
This method provides for routing information to clients that are connected to the server node. |
void |
sendToClientNodes(byte[] data,
Hashtable destinations,
int ignoreDestination)
|
void |
setNodeDestination(Destinations destination)
The invocation of this method implies that the node in question has been assigned a node address by the system, and also that this node is ready to process connection requests from clients and assign them addresses. |
void |
setVertexNode(Gateway vertexNode)
This method sets the vertex node for the node in question. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClientConnectionHandler(ProtocolHandler protocolHandler, int connectionLimit)
protocolHandler - Reference to the protocolHandler class| Method Detail |
|---|
public void setNodeDestination(Destinations destination)
destination - The destination for the node in questionpublic void setVertexNode(Gateway vertexNode)
vertexNode - The vertex Node of the connectivity graph at this node.public int getConcurrentConnections()
public int getConcurrentConnectionsLimit()
public void processClientRegistration(byte[] registerBytes,
String clientNode)
public void connectionToClientLost(Object clientIdentifier)
public void sendMessageToClient(int clientId,
String clientNode,
byte[] msg)
clientId - clientNode - msg - public void processClientAddressRequest(String clientNode, byte[] data)
data - The address request format.
public void sendToClientNodes(byte[] data,
Hashtable destinations)
data - The data that needs to be routed.destinations - The list of clients to which this information needs to be
routed.
public void sendToClientNodes(byte[] data,
Hashtable destinations,
int ignoreDestination)
public void sendToClientNodes(byte[] data,
ArrayList destinations,
int ignoreDestination)
data - The data that needs to be routed.destinations - The list of clients to which this information needs to be
routed.
public void sendToClientNode(byte[] data,
int destination)
data - The data that needs to be routed.destination - The clientID of the client to which this information needs to
be routed.public void routePayloadToEntity(Object clientKey, byte[] data)
public static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||