public class RouterStub extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
RouterStub.ConnectionListener |
static class |
RouterStub.ConnectionStatus |
Constructor and Description |
---|
RouterStub(String routerHost,
int routerPort,
InetAddress bindAddress,
RouterStub.ConnectionListener l)
Creates a stub for a remote Router object.
|
Modifier and Type | Method and Description |
---|---|
void |
checkConnection()
Checks whether the connection is open
|
void |
connect(String group,
Address addr,
String logical_name,
List<PhysicalAddress> phys_addrs)
Register this process with the router under
group . |
void |
destroy() |
void |
disconnect(String group,
Address addr) |
void |
doConnect() |
RouterStub.ConnectionStatus |
getConnectionStatus() |
InetSocketAddress |
getGossipRouterAddress() |
DataInputStream |
getInputStream() |
List<PingData> |
getMembers(String group) |
TUNNEL.StubReceiver |
getReceiver() |
Socket |
getSocket() |
int |
getSocketConnectionTimeout() |
int |
getSocketReadTimeout() |
void |
interrupt() |
boolean |
isConnected() |
boolean |
isTcpNoDelay() |
void |
join(long wait) |
void |
sendToAllMembers(String group,
byte[] data,
int offset,
int length) |
void |
sendToMember(String group,
Address dest,
byte[] data,
int offset,
int length) |
void |
setReceiver(TUNNEL.StubReceiver receiver) |
void |
setSocketConnectionTimeout(int sock_conn_timeout) |
void |
setSocketReadTimeout(int sock_read_timeout) |
void |
setTcpNoDelay(boolean tcp_nodelay) |
String |
toString() |
public RouterStub(String routerHost, int routerPort, InetAddress bindAddress, RouterStub.ConnectionListener l)
routerHost
- The name of the router's hostrouterPort
- The router's portSocketException
public void setReceiver(TUNNEL.StubReceiver receiver)
public TUNNEL.StubReceiver getReceiver()
public boolean isTcpNoDelay()
public void setTcpNoDelay(boolean tcp_nodelay)
public void interrupt()
public void join(long wait) throws InterruptedException
InterruptedException
public int getSocketConnectionTimeout()
public void setSocketConnectionTimeout(int sock_conn_timeout)
public int getSocketReadTimeout()
public void setSocketReadTimeout(int sock_read_timeout)
public boolean isConnected()
public RouterStub.ConnectionStatus getConnectionStatus()
public void connect(String group, Address addr, String logical_name, List<PhysicalAddress> phys_addrs) throws Exception
group
.group
- The name of the group under which to registerException
public void checkConnection()
public void destroy()
public Socket getSocket()
public InetSocketAddress getGossipRouterAddress()
public void sendToAllMembers(String group, byte[] data, int offset, int length) throws Exception
Exception
public void sendToMember(String group, Address dest, byte[] data, int offset, int length) throws Exception
Exception
public DataInputStream getInputStream()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.