|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcgl.narada.node.MultipleClientNode
public class MultipleClientNode
This class helps us setup multiple client nodes within one process. Each of the these client node's thus setup, can maintain connections to different server nodes within the network. In addition to this, they can also have specific subscription predicates. This class is very useful especially in the testing scenario where we have multiple clients being attached to multiple server nodes within the server network. The sockets are assigned assigned automatically to the client.
| Field Summary |
|---|
| Fields inherited from interface cgl.narada.node.NodeDebugFlags |
|---|
BrokerNode_Debug, BrokerPropertiesReader_Debug, ClientNode_Debug, ServerNode_Debug |
| Constructor Summary | |
|---|---|
MultipleClientNode()
The multiple client node constructor |
|
| Method Summary | |
|---|---|
void |
createMultipleClientNodesToServer(String serverName,
int portNum,
int numOfNodes,
String subscription)
This method sets up multiple client nodes with a specific subscription to a given node. |
static void |
main(String[] args)
The test fucntion for the multiple client node |
void |
setClientPortNum(int portNum)
This sets the initial portNum for a muli-client node, individual clients listen to sockets at portNums (which are incremented by 1 for every new client created) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MultipleClientNode()
| Method Detail |
|---|
public void setClientPortNum(int portNum)
portNum - The starting port number
public void createMultipleClientNodesToServer(String serverName,
int portNum,
int numOfNodes,
String subscription)
serverName - The name of the machine the server node is hosted on.portNum - The port number that the server node listens to for
connections either from clients or servers.numOfNodes - The number of client nodes that must have a connection
to the server.subscription - The subscription predicate for the client nodes
created by this invocationpublic static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||