Package org.jgroups.stack
Class RouterStub
java.lang.Object
org.jgroups.stack.RouterStub
Client stub that talks to a remote GossipRouter
- Author:
- Bela Ban
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic enum -
Constructor Summary
ConstructorsConstructorDescriptionRouterStub(String routerHost, int routerPort, InetAddress bindAddress, RouterStub.ConnectionListener l) Creates a stub for a remote Router object. -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks whether the connection is openvoidRegister this process with the router undergroup.voiddestroy()voiddisconnect(String group, Address addr) voidgetMembers(String group) intintvoidbooleanbooleanvoidjoin(long wait) voidsendToAllMembers(String group, byte[] data, int offset, int length) voidsendToMember(String group, Address dest, byte[] data, int offset, int length) voidsetReceiver(TUNNEL.StubReceiver receiver) voidsetSocketConnectionTimeout(int sock_conn_timeout) voidsetSocketReadTimeout(int sock_read_timeout) voidsetTcpNoDelay(boolean tcp_nodelay) toString()
-
Constructor Details
-
RouterStub
public RouterStub(String routerHost, int routerPort, InetAddress bindAddress, RouterStub.ConnectionListener l) Creates a stub for a remote Router object.- Parameters:
routerHost- The name of the router's hostrouterPort- The router's port- Throws:
SocketException
-
-
Method Details
-
setReceiver
-
getReceiver
-
isTcpNoDelay
public boolean isTcpNoDelay() -
setTcpNoDelay
public void setTcpNoDelay(boolean tcp_nodelay) -
interrupt
public void interrupt() -
join
- Throws:
InterruptedException
-
getSocketConnectionTimeout
public int getSocketConnectionTimeout() -
setSocketConnectionTimeout
public void setSocketConnectionTimeout(int sock_conn_timeout) -
getSocketReadTimeout
public int getSocketReadTimeout() -
setSocketReadTimeout
public void setSocketReadTimeout(int sock_read_timeout) -
isConnected
public boolean isConnected() -
getConnectionStatus
-
connect
public void connect(String group, Address addr, String logical_name, List<PhysicalAddress> phys_addrs) throws Exception Register this process with the router undergroup.- Parameters:
group- The name of the group under which to register- Throws:
Exception
-
doConnect
- Throws:
Exception
-
checkConnection
public void checkConnection()Checks whether the connection is open -
disconnect
-
destroy
public void destroy() -
getSocket
-
getMembers
- Throws:
Exception
-
getGossipRouterAddress
-
toString
-
sendToAllMembers
- Throws:
Exception
-
sendToMember
public void sendToMember(String group, Address dest, byte[] data, int offset, int length) throws Exception - Throws:
Exception
-
getInputStream
-