Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.rmi.activation
Class ActivationGroup  view ActivationGroup download ActivationGroup.java

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended byjava.rmi.server.UnicastRemoteObject
              extended byjava.rmi.activation.ActivationGroup
All Implemented Interfaces:
ActivationInstantiator, java.rmi.Remote, java.io.Serializable

public abstract class ActivationGroup
extends java.rmi.server.UnicastRemoteObject
implements ActivationInstantiator

The entity that receives the request to activate object and activates it. Frequently there is one activation group per virtual machine.


Field Summary
(package private) static java.lang.Class[] cConstructorTypes
          Used during the group creation (required constructor).
(package private) static ActivationGroupID currentGroupId
          The Id of the current group on this VM (null if none).
(package private)  ActivationGroupID groupId
          The groups identifier.
(package private)  long incarnation
          The groups incarnation number.
(package private)  ActivationMonitor monitor
          The groups activation monitor.
(package private) static long serialVersionUID
          Use the SVUID for interoperability.
(package private) static ActivationSystem system
          The groups activation system.
 
Fields inherited from class java.rmi.server.UnicastRemoteObject
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
protected ActivationGroup(ActivationGroupID aGroupId)
          Create the new activation group with the given group id.
 
Method Summary
protected  void activeObject(ActivationID id, java.rmi.MarshalledObject mObject)
          Makes the call back to the groups ActivationMonitor.
abstract  void activeObject(ActivationID id, java.rmi.Remote obj)
          The method is called when the object is exported.
static ActivationGroup createGroup(ActivationGroupID id, ActivationGroupDesc desc, long incarnation)
          Create the new instance of the activation group, using the class name and location information, stored in the passed descriptor.
static ActivationGroupID currentGroupID()
          Get the id of current activation group.
static ActivationSystem getSystem()
          Get the current activation system.
protected  void inactiveGroup()
          Makes the call back to the groups ActivationMonitor and sets the current group to null.
 boolean inactiveObject(ActivationID id)
          Notifies the monitor about the object being inactivated.
static void setSystem(ActivationSystem aSystem)
          Set the activation system for this virtual machine.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.rmi.activation.ActivationInstantiator
newInstance
 

Field Detail

serialVersionUID

static final long serialVersionUID
Use the SVUID for interoperability.

See Also:
Constant Field Values

currentGroupId

static ActivationGroupID currentGroupId
The Id of the current group on this VM (null if none).


groupId

final ActivationGroupID groupId
The groups identifier.


monitor

ActivationMonitor monitor
The groups activation monitor.


incarnation

long incarnation
The groups incarnation number.


system

static ActivationSystem system
The groups activation system.


cConstructorTypes

static final java.lang.Class[] cConstructorTypes
Used during the group creation (required constructor).

Constructor Detail

ActivationGroup

protected ActivationGroup(ActivationGroupID aGroupId)
                   throws java.rmi.RemoteException
Create the new activation group with the given group id.

Method Detail

activeObject

public abstract void activeObject(ActivationID id,
                                  java.rmi.Remote obj)
                           throws ActivationException,
                                  UnknownObjectException,
                                  java.rmi.RemoteException
The method is called when the object is exported. The group must notify the activation monitor, if this was not already done before.


inactiveObject

public boolean inactiveObject(ActivationID id)
                       throws ActivationException,
                              UnknownObjectException,
                              java.rmi.RemoteException
Notifies the monitor about the object being inactivated.


createGroup

public static ActivationGroup createGroup(ActivationGroupID id,
                                          ActivationGroupDesc desc,
                                          long incarnation)
                                   throws ActivationException
Create the new instance of the activation group, using the class name and location information, stored in the passed descriptor. The method expects the group class to have the two parameter constructor, the first parameter being the ActivationGroupID and the second the java.rmi.MarshalledObject. The group must be first be registered with the ActivationSystem. Once a group is created, the currentGroupID method returns the identifier for this group until the group becomes inactive.


currentGroupID

public static ActivationGroupID currentGroupID()
Get the id of current activation group.


setSystem

public static void setSystem(ActivationSystem aSystem)
                      throws ActivationException
Set the activation system for this virtual machine. The system can only be set if no group is active.


getSystem

public static ActivationSystem getSystem()
                                  throws ActivationException
Get the current activation system. If the system is not set via setSystem(java.rmi.activation.ActivationSystem) 55 method, the default system for this virtual machine is returned. The default system is first searched by name "java.rmi.activation.ActivationSystem" on the activation registry port. The default value of the activation registry port is ActivationSystem.SYSTEM_PORT 55 , but it can be changed by putting the system property java.rmi.activation.port. Both activation system and activation registry are provided by the RMI daemon tool, RMID, if it is running on the local host. If the RMID is not running, the internal transient activation system will be created and returned. This internal system is highly limited in in capabilities and is not intended to be used anywhere apart automated testing.


activeObject

protected void activeObject(ActivationID id,
                            java.rmi.MarshalledObject mObject)
                     throws ActivationException,
                            UnknownObjectException,
                            java.rmi.RemoteException
Makes the call back to the groups ActivationMonitor.


inactiveGroup

protected void inactiveGroup()
                      throws UnknownGroupException,
                             java.rmi.RemoteException
Makes the call back to the groups ActivationMonitor and sets the current group to null.