Class Overview
The default activation group implementation.
Public Constructors
Creates a default activation group implementation.
Parameters
id
| the group's identifier |
data
| ignored
|
Public Methods
public
void
activeObject
(ActivationID id, Remote impl)
The group's activeObject
method is called when an
object is exported (either by Activatable
object
construction or an explicit call to
Activatable.exportObject
. The group must inform its
ActivationMonitor
that the object is active (via
the monitor's activeObject
method) if the group
hasn't already done so.
Parameters
id
| the object's identifier |
impl
| the remote object implementation |
public
boolean
inactiveObject
(ActivationID id)
The group's inactiveObject
method is called
indirectly via a call to the Activatable.inactive
method. A remote object implementation must call
Activatable
's inactive
method when
that object deactivates (the object deems that it is no longer
active). If the object does not call
Activatable.inactive
when it deactivates, the
object will never be garbage collected since the group keeps
strong references to the objects it creates.
The group's inactiveObject
method
unexports the remote object from the RMI runtime so that the
object can no longer receive incoming RMI calls. This call will
only succeed if the object has no pending/executing calls. If
the object does have pending/executing RMI calls, then false
will be returned.
If the object has no pending/executing calls, the object is
removed from the RMI runtime and the group informs its
ActivationMonitor
(via the monitor's
inactiveObject
method) that the remote object is
not currently active so that the remote object will be
re-activated by the activator upon a subsequent activation
request.
Parameters
id
| the object's activation identifier |
Returns
- true if the object was successfully deactivated; otherwise
returns false.
Creates a new instance of an activatable remote object. The
Activator
calls this method to create an activatable
object in this group. This method should be idempotent; a call to
activate an already active object should return the previously
activated object.
Note: this method assumes that the Activator will only invoke
newInstance for the same object in a serial fashion (i.e.,
the activator will not allow the group to see concurrent requests
to activate the same object.
Parameters
id
| the object's activation identifier |
desc
| the object's activation descriptor |
Returns
- a marshalled object containing the activated object's stub