org.jgroups.stack
Class RouterStub
java.lang.Object
org.jgroups.stack.RouterStub
public class RouterStub
- extends java.lang.Object
Client stub that talks to a remote GossipRouter
- Version:
- $Id: RouterStub.java,v 1.30.4.3 2009/02/06 16:41:55 vlada Exp $
- Author:
- Bela Ban
Constructor Summary |
RouterStub(java.lang.String routerHost,
int routerPort,
java.net.InetAddress bindAddress)
Creates a stub for a remote Router object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
STATUS_CONNECTED
public static final int STATUS_CONNECTED
- See Also:
- Constant Field Values
STATUS_DISCONNECTED
public static final int STATUS_DISCONNECTED
- See Also:
- Constant Field Values
RouterStub
public RouterStub(java.lang.String routerHost,
int routerPort,
java.net.InetAddress bindAddress)
- Creates a stub for a remote Router object.
- Parameters:
routerHost
- The name of the router's hostrouterPort
- The router's port
isConnected
public boolean isConnected()
setConnectionListener
public void setConnectionListener(RouterStub.ConnectionListener conn_listener)
getLocalAddress
public Address getLocalAddress()
throws java.net.SocketException
- Throws:
java.net.SocketException
connect
public void connect(java.lang.String groupname)
throws java.lang.Exception
- Register this process with the router under
groupname
.
- Parameters:
groupname
- The name of the group under which to register
- Throws:
java.lang.Exception
disconnect
public void disconnect()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
sendToAllMembers
public void sendToAllMembers(byte[] data,
int offset,
int length)
throws java.lang.Exception
- Throws:
java.lang.Exception
sendToSingleMember
public void sendToSingleMember(Address dest,
byte[] data,
int offset,
int length)
throws java.lang.Exception
- Throws:
java.lang.Exception
getInputStream
public java.io.DataInputStream getInputStream()
throws java.io.IOException
- Throws:
java.io.IOException
Copyright ? 1998-2008 Bela Ban. All Rights Reserved.