jgroup
Class GroupManager
java.lang.Object
|
+--jgroup.GroupManager
- public class GroupManager
- extends java.lang.Object
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 method getGroupManager. As a parameter, this method takes a set of
objects implementing one or more listener interfaces. A group manager is constructed
by collecting and configuring the services needed by these objects. In order to obtain
an handler to one of these services, method getService could be invoked on
the group manager, by specifing the interface class of the desired service.
n object must request a group manager using the static
method of this class.
- Since:
- Jgroup 0.8
- Author:
- Alberto Montresor
Field Summary |
private static java.lang.Class |
ExternalGMIListenerClass
|
private static java.lang.reflect.Method |
getLayerMethod
Method object for class java.lang.reflect.Proxy |
private static boolean |
hasDynamicProxy
True if the class library contains dynamic proxy classes (1.3 or greater) |
private static java.lang.Class |
InternalGMIListenerClass
|
private static java.lang.Class |
listenerClass
|
(package private) java.util.HashMap |
map
|
private static java.lang.reflect.Method |
proxyMethod
Method object for class java.lang.reflect.Proxy |
Method Summary |
(package private) static void |
()
|
(package private) static void |
()
|
static GroupManager |
getGroupManager(java.lang.Object[] configuration,
java.lang.Object[] listeners)
Returns a group manager object containing handlers for each of the services associated
to the listener interfaces implemented by objects contained in the listeners
array. |
private GroupManager |
getGroupManager2(java.lang.Object[] configuration,
java.lang.Object[] listeners)
This method is a first schema of a completely dynamic solution
to the problem of generating a group manager for a set of
interfaces implemented by a server. |
(package private) static java.lang.Object |
getProxy(java.lang.Object server,
java.util.ArrayList list,
java.lang.Object[] conf,
MulticastService multicastService,
relacs.gm.DispatcherService dispatcherService)
Returns a proxy object for the server indicated in the |
java.lang.Object |
getService(java.lang.Class cl)
Returns an handler to a Jgroup service (e.g., the membership service) specified by the
interface class cl. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
hasDynamicProxy
private static boolean hasDynamicProxy
- True if the class library contains dynamic proxy classes (1.3 or greater)
proxyMethod
private static java.lang.reflect.Method proxyMethod
- Method object for class java.lang.reflect.Proxy
getLayerMethod
private static java.lang.reflect.Method getLayerMethod
- Method object for class java.lang.reflect.Proxy
map
java.util.HashMap map
listenerClass
private static java.lang.Class listenerClass
ExternalGMIListenerClass
private static java.lang.Class ExternalGMIListenerClass
InternalGMIListenerClass
private static java.lang.Class InternalGMIListenerClass
GroupManager
private GroupManager()
GroupManager
private GroupManager(java.util.HashMap map)
static void ()
getService
public java.lang.Object getService(java.lang.Class cl)
- Returns an handler to a Jgroup service (e.g., the membership service) specified by the
interface class cl. In order to such service to be returned by a group manager,
the corresponding listener interface must be implemented by one of the listener objects
that have been passed as an argument of method getGroupManager when creating
the group manager.
- Parameters:
cl
- Class specifying the interface of the required service- Throws:
ClassCastException
- If the generated group manager is unable to provide the requested service
class.
getGroupManager
public static GroupManager getGroupManager(java.lang.Object[] configuration,
java.lang.Object[] listeners)
throws JgroupException,
java.rmi.RemoteException
- Returns a group manager object containing handlers for each of the services associated
to the listener interfaces implemented by objects contained in the listeners
array.
- Parameters:
configuration
- objects needed to configure the requested serviceslisteners
- objects implementing the listeners interfaces associated to the
the requested services (currently, this object may contain at most one listener)- Throws:
JgroupException
- raised if some configuration error occurs.
getProxy
static java.lang.Object getProxy(java.lang.Object server,
java.util.ArrayList list,
java.lang.Object[] conf,
MulticastService multicastService,
relacs.gm.DispatcherService dispatcherService)
throws JgroupException
- Returns a proxy object for the server indicated in the
getGroupManager2
private GroupManager getGroupManager2(java.lang.Object[] configuration,
java.lang.Object[] listeners)
throws JgroupException,
java.rmi.RemoteException
- This method is a first schema of a completely dynamic solution
to the problem of generating a group manager for a set of
interfaces implemented by a server.
static void ()