java.rmi.activation
public abstract class ActivationGroup extends UnicastRemoteObject implements ActivationInstantiator
ref
Modifier | Constructor and Description |
---|---|
protected |
ActivationGroup(ActivationGroupID aGroupId)
Create the new activation group with the given group id.
|
Modifier and Type | Method and Description |
---|---|
protected void |
activeObject(ActivationID id,
MarshalledObject<? extends Remote> mObject)
Makes the call back to the groups
ActivationMonitor . |
abstract void |
activeObject(ActivationID id,
Remote obj)
The method is called when the object is exported.
|
static ActivationGroup |
createGroup(ActivationGroupID id,
ActivationGroupDesc desc,
long incarnation)
Create the new instance of the activation group, using the class name and
location information, stored in the passed descriptor.
|
static ActivationGroupID |
currentGroupID()
Get the id of current activation group.
|
static ActivationSystem |
getSystem()
Get the current activation system.
|
protected void |
inactiveGroup()
Makes the call back to the groups
ActivationMonitor and sets
the current group to null. |
boolean |
inactiveObject(ActivationID id)
Notifies the monitor about the object being inactivated.
|
static void |
setSystem(ActivationSystem aSystem)
Set the activation system for this virtual machine.
|
clone, exportObject, exportObject, exportObject, unexportObject
getClientHost, getLog, setLog
equals, getRef, hashCode, toString, toStub
finalize, getClass, notify, notifyAll, wait, wait, wait
newInstance
protected ActivationGroup(ActivationGroupID aGroupId) throws RemoteException
aGroupId
- the group Id.RemoteException
- if the group export fails.public abstract void activeObject(ActivationID id, Remote obj) throws ActivationException, UnknownObjectException, RemoteException
id
- the object activation idobj
- the remote object implementationActivationException
- if the group is inactiveUnknownObjectException
- if such object is not knownRemoteException
- if the call to monitor failspublic boolean inactiveObject(ActivationID id) throws ActivationException, UnknownObjectException, RemoteException
id
- the object being inactivated.ActivationException
- neverUnknownObjectException
- if the object is not knownRemoteException
- if the remote call to monitor failspublic static ActivationGroup createGroup(ActivationGroupID id, ActivationGroupDesc desc, long incarnation) throws ActivationException
ActivationGroupID
and the second the
MarshalledObject
. The group must be first be registered with the
ActivationSystem. Once a group is created, the currentGroupID method
returns the identifier for this group until the group becomes inactive.id
- the activation group iddesc
- the group descriptor, providing the information, necessary to
create the groupincarnation
- the incarnation numberActivationException
- if the activation fails due any reasonpublic static ActivationGroupID currentGroupID()
public static void setSystem(ActivationSystem aSystem) throws ActivationException
aSystem
- the system to setActivationException
- if some group is active now.public static ActivationSystem getSystem() throws ActivationException
setSystem(java.rmi.activation.ActivationSystem)
method, the default system for this virtual machine is
returned. The default system is first searched by name
"java.rmi.activation.ActivationSystem" on the activation registry port. The
default value of the activation registry port is
ActivationSystem.SYSTEM_PORT
, but it can be changed by putting the
system property java.rmi.activation.port. Both activation system and
activation registry are provided by the RMI daemon tool, RMID, if it is
running on the local host. If the RMID is not running, the internal
transient activation system will be created and returned. This internal
system is highly limited in in capabilities and is not intended to be used
anywhere apart automated testing.ActivationException
protected void activeObject(ActivationID id, MarshalledObject<? extends Remote> mObject) throws ActivationException, UnknownObjectException, RemoteException
ActivationMonitor
.id
- the id obj the object being activatedmObject
- the marshalled object, contains the activated remote object
stub.ActivationException
- on activation errorUnknownObjectException
- if such object is not registeredRemoteException
- on remote call (to monitor) errorprotected void inactiveGroup() throws UnknownGroupException, RemoteException
ActivationMonitor
and sets
the current group to null.UnknownGroupException
RemoteException