GigaSpaces XAP 10.0.1 API

net.jini.activation
Class ActivationGroup

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

public abstract class ActivationGroup
extends ActivationGroup

Subclass of java.rmi.activation.ActivationGroup to allow activatable objects that are exported using an Exporter to go inactive.

This class can be used only productively in conjunction with an activation system daemon implementation that will cause the createGroup method of this class to be called. The standard rmid does not do this.

Since:
2.0
Author:
Sun Microsystems, Inc.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
protected ActivationGroup(ActivationGroupID id)
          Constructs an activation group with the specified activation group identifier.
 
Method Summary
static ActivationGroup createGroup(ActivationGroupID id, ActivationGroupDesc desc, long incarnation)
          Creates and sets the activation group for the current virtual machine.
static boolean inactive(ActivationID id, Exporter exporter)
          Attempts to make the remote object that is associated with the specified activation identifier, and that was exported through the specified exporter, inactive.
abstract  boolean inactiveObject(ActivationID id, Exporter exporter)
          Attempts to make the remote object that is associated with the specified activation identifier, and that was exported through the specified exporter, inactive.
 
Methods inherited from class java.rmi.activation.ActivationGroup
activeObject, activeObject, currentGroupID, getSystem, inactiveGroup, inactiveObject, setSystem
 
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
 

Constructor Detail

ActivationGroup

protected ActivationGroup(ActivationGroupID id)
                   throws RemoteException
Constructs an activation group with the specified activation group identifier. This constructor exports the group as a UnicastRemoteObject. A subclass constructor can, if desired, unexport the group and then re-export it a different way.

Parameters:
id - the activation group identifier
Throws:
RemoteException - if this group could not be exported
Method Detail

createGroup

public static ActivationGroup createGroup(ActivationGroupID id,
                                          ActivationGroupDesc desc,
                                          long incarnation)
                                   throws ActivationException
Creates and sets the activation group for the current virtual machine. This method calls java.rmi.activation.ActivationGroup.createGroup with the same arguments, and returns the result. This method must be called in order to use the inactive method of this class.

Parameters:
id - the activation group identifier
desc - the activation group descriptor
incarnation - the group incarnation number (zero on initial creation)
Returns:
the created activation group
Throws:
ActivationException - if a group already exists, if the group's class is not a subclass of this class, or if an exception occurs creating the group
SecurityException - if a security manager exists and invoking its checkSetFactory method throws a SecurityException

inactive

public static boolean inactive(ActivationID id,
                               Exporter exporter)
                        throws ActivationException,
                               RemoteException
Attempts to make the remote object that is associated with the specified activation identifier, and that was exported through the specified exporter, inactive. This method calls the inactiveObject method of the current group with the same arguments, and returns the result. The overall effect is as follows. The unexport method of the specified exporter is called with false as an argument. If that call returns false, this method returns false. If that call returns true, the object is marked inactive in this virtual machine, the ActivationMonitor.inactiveObject method of the group's monitor is called to inform the activation system daemon that the object is inactive, and this method returns true.

Parameters:
id - the object's activation identifier
exporter - the exporter to use to unexport the object
Returns:
true if the object was successfully made inactive; false otherwise
Throws:
UnknownObjectException - if the object is not known to be active (it may already be inactive)
ActivationException - if the group is not active
RemoteException - if the remote call to the activation monitor fails

inactiveObject

public abstract boolean inactiveObject(ActivationID id,
                                       Exporter exporter)
                                throws ActivationException,
                                       RemoteException
Attempts to make the remote object that is associated with the specified activation identifier, and that was exported through the specified exporter, inactive. The unexport method of the specified exporter is called with false as an argument. If that call returns false, this method returns false. If that call returns true, the object is marked inactive in this virtual machine, the ActivationMonitor.inactiveObject method of the group's monitor is called to inform the activation system daemon that the object is inactive, and this method returns true.

Parameters:
id - the object's activation identifier
exporter - the exporter to use to unexport the object
Returns:
true if the object was successfully made inactive; false otherwise
Throws:
UnknownObjectException - if the object is not known to be active (it may already be inactive)
ActivationException - if the group is not active
RemoteException - if the remote call to the activation monitor fails

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.