- All Superinterfaces:
- Remote
public interface ActivationSystem extends Remote
The 
ActivationSystem provides a means for registering
 groups and "activatable" objects to be activated within those groups.
 The ActivationSystem works closely with the
 Activator, which activates objects registered via the
 ActivationSystem, and the ActivationMonitor,
 which obtains information about active and inactive objects,
 and inactive groups.- Since:
- 1.2
- See Also:
- Activator,- ActivationMonitor
- 
Field SummaryFields Modifier and Type Field Description static intSYSTEM_PORTThe port to lookup the activation system.
- 
Method SummaryModifier and Type Method Description ActivationMonitoractiveGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation)Callback to inform activation system that group is now active.ActivationDescgetActivationDesc(ActivationID id)Returns the activation descriptor, for the object with the activation identifier,id.ActivationGroupDescgetActivationGroupDesc(ActivationGroupID id)Returns the activation group descriptor, for the group with the activation group identifier,id.ActivationGroupIDregisterGroup(ActivationGroupDesc desc)Register the activation group.ActivationIDregisterObject(ActivationDesc desc)TheregisterObjectmethod is used to register an activation descriptor,desc, and obtain an activation identifier for a activatable remote object.ActivationDescsetActivationDesc(ActivationID id, ActivationDesc desc)Set the activation descriptor,descfor the object with the activation identifier,id.ActivationGroupDescsetActivationGroupDesc(ActivationGroupID id, ActivationGroupDesc desc)Set the activation group descriptor,descfor the object with the activation group identifier,id.voidshutdown()Shutdown the activation system.voidunregisterGroup(ActivationGroupID id)Remove the activation group.voidunregisterObject(ActivationID id)Remove the activation id and associated descriptor previously registered with theActivationSystem; the object can no longer be activated via the object's activation id.
- 
Field Details- 
SYSTEM_PORTstatic final int SYSTEM_PORTThe port to lookup the activation system.- See Also:
- Constant Field Values
 
 
- 
- 
Method Details- 
registerObjectActivationID registerObject(ActivationDesc desc) throws ActivationException, UnknownGroupException, RemoteExceptionTheregisterObjectmethod is used to register an activation descriptor,desc, and obtain an activation identifier for a activatable remote object. TheActivationSystemcreates anActivationID(a activation identifier) for the object specified by the descriptor,desc, and records, in stable storage, the activation descriptor and its associated identifier for later use. When theActivatorreceives anactivaterequest for a specific identifier, it looks up the activation descriptor (registered previously) for the specified identifier and uses that information to activate the object.- Parameters:
- desc- the object's activation descriptor
- Returns:
- the activation id that can be used to activate the object
- Throws:
- ActivationException- if registration fails (e.g., database update failure, etc).
- UnknownGroupException- if group referred to in- descis not registered with this system
- RemoteException- if remote call fails
- Since:
- 1.2
 
- 
unregisterObjectvoid unregisterObject(ActivationID id) throws ActivationException, UnknownObjectException, RemoteExceptionRemove the activation id and associated descriptor previously registered with theActivationSystem; the object can no longer be activated via the object's activation id.- Parameters:
- id- the object's activation id (from previous registration)
- Throws:
- ActivationException- if unregister fails (e.g., database update failure, etc).
- UnknownObjectException- if object is unknown (not registered)
- RemoteException- if remote call fails
- Since:
- 1.2
 
- 
registerGroupActivationGroupID registerGroup(ActivationGroupDesc desc) throws ActivationException, RemoteExceptionRegister the activation group. An activation group must be registered with theActivationSystembefore objects can be registered within that group.- Parameters:
- desc- the group's descriptor
- Returns:
- an identifier for the group
- Throws:
- ActivationException- if group registration fails
- RemoteException- if remote call fails
- Since:
- 1.2
 
- 
activeGroupActivationMonitor activeGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation) throws UnknownGroupException, ActivationException, RemoteExceptionCallback to inform activation system that group is now active. This call is made internally by theActivationGroup.createGroupmethod to inform theActivationSystemthat the group is now active.- Parameters:
- id- the activation group's identifier
- group- the group's instantiator
- incarnation- the group's incarnation number
- Returns:
- monitor for activation group
- Throws:
- UnknownGroupException- if group is not registered
- ActivationException- if a group for the specified- idis already active and that group is not equal to the specified- groupor that group has a different- incarnationthan the specified- group
- RemoteException- if remote call fails
- Since:
- 1.2
 
- 
unregisterGroupvoid unregisterGroup(ActivationGroupID id) throws ActivationException, UnknownGroupException, RemoteExceptionRemove the activation group. An activation group makes this call back to inform the activator that the group should be removed (destroyed). If this call completes successfully, objects can no longer be registered or activated within the group. All information of the group and its associated objects is removed from the system.- Parameters:
- id- the activation group's identifier
- Throws:
- ActivationException- if unregister fails (e.g., database update failure, etc).
- UnknownGroupException- if group is not registered
- RemoteException- if remote call fails
- Since:
- 1.2
 
- 
shutdownShutdown the activation system. Destroys all groups spawned by the activation daemon and exits the activation daemon.- Throws:
- RemoteException- if failed to contact/shutdown the activation daemon
- Since:
- 1.2
 
- 
setActivationDescActivationDesc setActivationDesc(ActivationID id, ActivationDesc desc) throws ActivationException, UnknownObjectException, UnknownGroupException, RemoteExceptionSet the activation descriptor,descfor the object with the activation identifier,id. The change will take effect upon subsequent activation of the object.- Parameters:
- id- the activation identifier for the activatable object
- desc- the activation descriptor for the activatable object
- Returns:
- the previous value of the activation descriptor
- Throws:
- UnknownGroupException- the group associated with- descis not a registered group
- UnknownObjectException- the activation- idis not registered
- ActivationException- for general failure (e.g., unable to update log)
- RemoteException- if remote call fails
- Since:
- 1.2
- See Also:
- getActivationDesc(java.rmi.activation.ActivationID)
 
- 
setActivationGroupDescActivationGroupDesc setActivationGroupDesc(ActivationGroupID id, ActivationGroupDesc desc) throws ActivationException, UnknownGroupException, RemoteExceptionSet the activation group descriptor,descfor the object with the activation group identifier,id. The change will take effect upon subsequent activation of the group.- Parameters:
- id- the activation group identifier for the activation group
- desc- the activation group descriptor for the activation group
- Returns:
- the previous value of the activation group descriptor
- Throws:
- UnknownGroupException- the group associated with- idis not a registered group
- ActivationException- for general failure (e.g., unable to update log)
- RemoteException- if remote call fails
- Since:
- 1.2
- See Also:
- getActivationGroupDesc(java.rmi.activation.ActivationGroupID)
 
- 
getActivationDescActivationDesc getActivationDesc(ActivationID id) throws ActivationException, UnknownObjectException, RemoteExceptionReturns the activation descriptor, for the object with the activation identifier,id.- Parameters:
- id- the activation identifier for the activatable object
- Returns:
- the activation descriptor
- Throws:
- UnknownObjectException- if- idis not registered
- ActivationException- for general failure
- RemoteException- if remote call fails
- Since:
- 1.2
- See Also:
- setActivationDesc(java.rmi.activation.ActivationID, java.rmi.activation.ActivationDesc)
 
- 
getActivationGroupDescActivationGroupDesc getActivationGroupDesc(ActivationGroupID id) throws ActivationException, UnknownGroupException, RemoteExceptionReturns the activation group descriptor, for the group with the activation group identifier,id.- Parameters:
- id- the activation group identifier for the group
- Returns:
- the activation group descriptor
- Throws:
- UnknownGroupException- if- idis not registered
- ActivationException- for general failure
- RemoteException- if remote call fails
- Since:
- 1.2
- See Also:
- setActivationGroupDesc(java.rmi.activation.ActivationGroupID, java.rmi.activation.ActivationGroupDesc)
 
 
-