FileDocCategorySizeDatePackage
ActivationSystem.javaAPI DocJava SE 5 API9160Fri Aug 26 14:57:12 BST 2005java.rmi.activation

ActivationSystem

public interface ActivationSystem implements 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.
author
Ann Wollrath
version
1.18, 12/19/03
see
Activator
see
ActivationMonitor
since
1.2

Fields Summary
public static final int
SYSTEM_PORT
The port to lookup the activation system.
Constructors Summary
Methods Summary
public ActivationMonitoractiveGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation)
Callback to inform activation system that group is now active. This call is made internally by the ActivationGroup.createGroup method to inform the ActivationSystem that the group is now active.

param
id the activation group's identifier
param
group the group's instantiator
param
incarnation the group's incarnation number
return
monitor for activation group
exception
UnknownGroupException if group is not registered
exception
ActivationException if a group for the specified id is already active and that group is not equal to the specified group or that group has a different incarnation than the specified group
exception
RemoteException if remote call fails
since
1.2

public ActivationDescgetActivationDesc(ActivationID id)
Returns the activation descriptor, for the object with the activation identifier, id.

param
id the activation identifier for the activatable object
exception
UnknownObjectException if id is not registered
exception
ActivationException for general failure
exception
RemoteException if remote call fails
return
the activation descriptor
see
#setActivationDesc
since
1.2

public ActivationGroupDescgetActivationGroupDesc(ActivationGroupID id)
Returns the activation group descriptor, for the group with the activation group identifier, id.

param
id the activation group identifier for the group
exception
UnknownGroupException if id is not registered
exception
ActivationException for general failure
exception
RemoteException if remote call fails
return
the activation group descriptor
see
#setActivationGroupDesc
since
1.2

public ActivationGroupIDregisterGroup(ActivationGroupDesc desc)
Register the activation group. An activation group must be registered with the ActivationSystem before objects can be registered within that group.

param
desc the group's descriptor
return
an identifier for the group
exception
ActivationException if group registration fails
exception
RemoteException if remote call fails
since
1.2

public ActivationIDregisterObject(ActivationDesc desc)
The registerObject method is used to register an activation descriptor, desc, and obtain an activation identifier for a activatable remote object. The ActivationSystem creates an ActivationID (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 the Activator receives an activate request for a specific identifier, it looks up the activation descriptor (registered previously) for the specified identifier and uses that information to activate the object.

param
desc the object's activation descriptor
return
the activation id that can be used to activate the object
exception
ActivationException if registration fails (e.g., database update failure, etc).
exception
UnknownGroupException if group referred to in desc is not registered with this system
exception
RemoteException if remote call fails
since
1.2

public ActivationDescsetActivationDesc(ActivationID id, ActivationDesc desc)
Set the activation descriptor, desc for the object with the activation identifier, id. The change will take effect upon subsequent activation of the object.

param
id the activation identifier for the activatable object
param
desc the activation descriptor for the activatable object
exception
UnknownGroupException the group associated with desc is not a registered group
exception
UnknownObjectException the activation id is not registered
exception
ActivationException for general failure (e.g., unable to update log)
exception
RemoteException if remote call fails
return
the previous value of the activation descriptor
see
#getActivationDesc
since
1.2

public ActivationGroupDescsetActivationGroupDesc(ActivationGroupID id, ActivationGroupDesc desc)
Set the activation group descriptor, desc for the object with the activation group identifier, id. The change will take effect upon subsequent activation of the group.

param
id the activation group identifier for the activation group
param
desc the activation group descriptor for the activation group
exception
UnknownGroupException the group associated with id is not a registered group
exception
ActivationException for general failure (e.g., unable to update log)
exception
RemoteException if remote call fails
return
the previous value of the activation group descriptor
see
#getActivationGroupDesc
since
1.2

public voidshutdown()
Shutdown the activation system. Destroys all groups spawned by the activation daemon and exits the activation daemon.

exception
RemoteException if failed to contact/shutdown the activation daemon
since
1.2

public voidunregisterGroup(ActivationGroupID id)
Remove 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.

param
id the activation group's identifier
exception
ActivationException if unregister fails (e.g., database update failure, etc).
exception
UnknownGroupException if group is not registered
exception
RemoteException if remote call fails
since
1.2

public voidunregisterObject(ActivationID id)
Remove the activation id and associated descriptor previously registered with the ActivationSystem; the object can no longer be activated via the object's activation id.

param
id the object's activation id (from previous registration)
exception
ActivationException if unregister fails (e.g., database update failure, etc).
exception
UnknownObjectException if object is unknown (not registered)
exception
RemoteException if remote call fails
since
1.2