|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjgroup.core.GroupManager
public final class GroupManager
The GroupManager
class is used to configure the Jgroup
system. In order to make use of the Jgroup facilities, a group
manager must be obtained through the invocation of static factory
method getGroupManager
. The main parameter to this
method is the server object that implements a number of listener
interfaces. That is, the server object is a listener for various
services. A group manager is constructed by collecting and
configuring the services needed by the server object. In order for
a server object to gain access to one of the provided services, the
method getService
can be invoked on the group manager,
by specifying the service interface class or the shorthand service
name (as given in the services.xml
file) of the desired
service.
Method Summary | |
---|---|
static boolean |
contains(int gid)
|
int |
getGroupId()
Returns the group identifier for this group manager instance. |
static GroupManager |
getGroupManager(int gid)
|
static GroupManager |
getGroupManager(int groupId,
java.lang.String[] serviceSet,
java.lang.Object listener)
Returns a group manager object through which handlers, for each of the services associated with the listener interfaces implemented by the specified object, can be accessed. |
static GroupManager |
getGroupManager(java.lang.Object listener)
Returns a group manager object through which handlers, for each of the services associated with the listener interfaces implemented by the specified object, can be accessed. |
MemberId |
getLocalMember()
Returns the local member identifier associated with this group manager. |
java.lang.Object |
getService(java.lang.Class cl)
Returns an handler for a Jgroup service (e.g., the membership service) specified by the interface class cl . |
static java.lang.Object |
getService(int gid,
java.lang.Class service)
|
java.lang.Object |
getService(java.lang.String serviceName)
Returns an handler for a Jgroup service (e.g., the membership service) specified by the shorthand service name, as specified in the services.xml file. |
static boolean |
isEmpty()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.lang.Object getService(java.lang.Class cl)
cl
.
Services provided by this instance of the group manager, must have
been initialized when invoking the static factory method
getGroupManager
. That is, the service must have been
specified either in the LayerStack
entry of the
corresponding application in the application.xml
file, or through the serviceSet
array provided to the
getGroupManager
method.
cl
- Class specifying the interface of the required service.
java.lang.ClassCastException
- If the generated group manager is unable to provide the requested
service class.public java.lang.Object getService(java.lang.String serviceName)
services.xml
file. Services provided by this
instance of the group manager, must have been initialized when
invoking the static factory method getGroupManager
.
That is, the service must have been specified either in the
LayerStack
entry of the corresponding application in
the application.xml
file, or through the
serviceSet
array provided to the
getGroupManager
method.
serviceName
- Shorthand name for the required service.
java.lang.ClassCastException
- If the generated group manager is unable to provide the requested
service class.public int getGroupId()
public MemberId getLocalMember()
public static GroupManager getGroupManager(int gid)
public static java.lang.Object getService(int gid, java.lang.Class service)
public static boolean contains(int gid)
public static boolean isEmpty()
public static GroupManager getGroupManager(java.lang.Object listener) throws JgroupException
listener
- Object implementing the listeners interfaces associated with the
the requested services.
JgroupException
- Raised if some configuration error occurs.public static GroupManager getGroupManager(int groupId, java.lang.String[] serviceSet, java.lang.Object listener) throws JgroupException
serviceSet
- An array of String
s, each representing a service or
layer that should be incorporated with the returned GroupManager.listener
- Object implementing the listeners interfaces associated with the
the requested services.
JgroupException
- Raised if some configuration error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |