|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgroups.stack.RouterStub
public class RouterStub
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
|
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. |
boolean |
isConnected()
|
static void |
main(java.lang.String[] args)
|
Message |
receive()
Receives a message from the router (blocking mode). |
boolean |
reconnect()
|
boolean |
reconnect(int max_attempts)
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 |
Field Detail |
---|
protected static final org.apache.commons.logging.Log log
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 boolean isConnected()
public Address connect() throws java.lang.Exception
java.lang.Exception
public void disconnect()
public boolean register(java.lang.String groupname)
groupname
.
groupname
- The name of the group under which to register
public List get(java.lang.String groupname)
public boolean send(Message msg, java.lang.String groupname)
public Message receive()
public boolean reconnect(int max_attempts)
public boolean reconnect()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |