net.jini.activation
Class ActivationGroup
java.lang.Object
  
java.rmi.server.RemoteObject
      
java.rmi.server.RemoteServer
          
java.rmi.server.UnicastRemoteObject
              
java.rmi.activation.ActivationGroup
                  
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
 
 
 
 
| 
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. | 
 
 
 
 
 
 
 
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
 
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 identifierdesc - the activation group descriptorincarnation - 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 identifierexporter - 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 identifierexporter - 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
 
 
Copyright © GigaSpaces.