|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.javagroups.stack.RouterStub
Constructor Summary | |
RouterStub(java.lang.String router_host,
int router_port)
Creates a stub for a remote Router object. |
Method Summary | |
Address |
connect()
Establishes a connection to the router. |
void |
disconnect()
Closes the socket and the input and output streams associated with it |
List |
get(java.lang.String groupname)
Retrieves the membership (list of Addresses) for a given group. |
static void |
main(java.lang.String[] args)
|
Message |
receive()
Receives a message from the router (blocking mode). |
boolean |
reconnect()
Tries to establish connection to router. |
boolean |
register(java.lang.String groupname)
Register this process with the router under groupname . |
boolean |
send(Message msg,
java.lang.String groupname)
Sends a message to the router. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RouterStub(java.lang.String router_host, int router_port)
router_host
- The name of the router's hostrouter_port
- The router's portMethod Detail |
public Address connect()
public void disconnect()
public boolean register(java.lang.String groupname)
groupname
.groupname
- The name of the group under which to registerpublic List get(java.lang.String groupname)
public boolean send(Message msg, java.lang.String groupname)
public Message receive()
public boolean reconnect()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |