Novell exteNd Messaging Platform 5.2

com.sssw.jbroker.api.multicast
Class Group

java.lang.Object
  extended bycom.sssw.jbroker.api.multicast.Group

public class Group
extends Object

A Group represents a set of objects that communicate using multicast messages. It is composed of two components - a multicast IP address, and a unique name.

Since:
JBroker 2.1

Method Summary
static Group createGroup(ORB orb, InetAddress address, String name)
          Create a multicast Group.
 Object createObjref(Class cl)
          Get the object reference of a given type and default ttl of 1 to communicate with this Group.
 Object createObjref(Class cl, byte ttl)
          Get the object reference of a given type and ttl to communicate with this Group.
 boolean equals(Object obj)
          Compares two Objects for equality.
 String getHostAddress()
          Returns the IP address string "%d.%d.%d.%d".
 InetAddress getInetAddress()
          Returns the IP adress for this Group.
 String getName()
          Get the name of the Group.
 int hashCode()
          Returns a hash code value for the object.
 Object joinGroup(MulticastObject servant)
          Make the given servant join this group.
 Object joinGroup(MulticastObject servant, byte ttl)
          Make the given servant join this group.
 Object joinGroup(Remote remote)
          Make the given Remote join this Group.
 Object joinGroup(Remote remote, byte ttl)
          Make the given Remote join this Group.
 void leaveGroup(MulticastObject servant)
           
 void leaveGroup(Remote remote)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createGroup

public static Group createGroup(ORB orb,
                                InetAddress address,
                                String name)
                         throws MulticastServerException
Create a multicast Group.

Parameters:
orb - the JBroker orb in use
address - the multicast address
name - the group name
Throws:
MulticastServerException

createObjref

public Object createObjref(Class cl,
                           byte ttl)
                    throws MulticastServerException
Get the object reference of a given type and ttl to communicate with this Group.

Parameters:
cl - the interface of the multicast object
ttl - the multicast ttl for object invocations
Returns:
multicast object reference of the given type
Throws:
MulticastServerException

createObjref

public Object createObjref(Class cl)
                    throws MulticastServerException
Get the object reference of a given type and default ttl of 1 to communicate with this Group.

Parameters:
cl - the interface of the multicast object
Returns:
multicast object reference of the given type
Throws:
MulticastServerException

joinGroup

public Object joinGroup(Remote remote)
                 throws RemoteException
Make the given Remote join this Group. An appropriate Tie is found for this Remote and it is exported so that it can start receiving multicast invocations. An object reference (with default ttl of 1) is returned, which when invoked on, results in an invocation on this Remote.

Parameters:
remote - the multicast object implementation
Returns:
object reference for this multicast object
Throws:
RemoteException

joinGroup

public Object joinGroup(Remote remote,
                        byte ttl)
                 throws RemoteException
Make the given Remote join this Group. An appropriate Tie is found for this Remote and it is exported so that it can start receiving multicast invocations. An object reference (with the given ttl) is returned, which when invoked on, results in an invocation on this Remote.

Parameters:
remote - the multicast object implementation
ttl - the multicast ttl for object invocations
Returns:
object reference for this multicast object
Throws:
RemoteException

joinGroup

public Object joinGroup(MulticastObject servant)
Make the given servant join this group. An object reference (with the default ttl of 1) is returned, which when invoked on, results in an invocation on this servant.

Parameters:
servant - the multicast servant that receives requests
Returns:
object reference for this multicast object

joinGroup

public Object joinGroup(MulticastObject servant,
                        byte ttl)
Make the given servant join this group. An object reference (with the given ttl) is returned, which when invoked on, results in an invocation on this servant.

Parameters:
servant - the multicast servant that receives requests
ttl - the multicast ttl for object invocations
Returns:
object reference for this multicast object

leaveGroup

public void leaveGroup(Remote remote)

leaveGroup

public void leaveGroup(MulticastObject servant)

getName

public final String getName()
Get the name of the Group.

Returns:
name of the Group

getHostAddress

public final String getHostAddress()
Returns the IP address string "%d.%d.%d.%d".

Returns:
the raw IP address in a string format

getInetAddress

public final InetAddress getInetAddress()
Returns the IP adress for this Group.

Returns:
the IP address

hashCode

public int hashCode()
Returns a hash code value for the object.


equals

public boolean equals(Object obj)
Compares two Objects for equality.


Novell exteNd Messaging Platform 5.2

exteNd is a registered trademark of Novell, Inc.
Copyright 1998-2004 Novell, Inc. All Rights Reserved.