Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.rmi.activation
Interface ActivationSystem  view ActivationSystem download ActivationSystem.java

All Superinterfaces:
java.rmi.Remote

public interface ActivationSystem
extends java.rmi.Remote

The ActivationSystem registers groups and activatable objects to be activated within those groups. The ActivationSystem cooperates with both the Activator, which activates objects registered via the ActivationSystem, and the ActivationMonitor, which obtains information about active and inactive objects and inactive groups.

The activation system if frequently a remote object. As a security mean, all methods in this interface throw java.rmi.AccessException if called from the client that is not reside on the same host as the activation system.


Field Summary
static int SYSTEM_PORT
          The port, used by the activation system.
 
Method Summary
 ActivationMonitor activeGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation)
          This method is called from the ActivationGroup to inform the ActivatinSystem that the group is now active and there is the ActivationInstantiator for that group.
 ActivationDesc getActivationDesc(ActivationID id)
          Get the activation descriptor for the object with the given activation id.
 ActivationGroupDesc getActivationGroupDesc(ActivationGroupID groupId)
          Get the group descriptor for the group with the given id.
 ActivationGroupID registerGroup(ActivationGroupDesc groupDesc)
          Register the new activation group.
 ActivationID registerObject(ActivationDesc desc)
          Registers the activation descriptor and creates (and returns) its activation identifier.
 ActivationDesc setActivationDesc(ActivationID id, ActivationDesc desc)
          Replace the activation descriptor for the object with the given activation id.
 ActivationGroupDesc setActivationGroupDesc(ActivationGroupID groupId, ActivationGroupDesc groupDesc)
          Replaces the group descriptor for the group with the given group activation id.
 void shutdown()
          Shutdown the activation system and all associated activation groups
 void unregisterGroup(ActivationGroupID id)
          Removes the activation group with the given identifier.
 void unregisterObject(ActivationID id)
          Removes the stored identifier-description map entry.
 

Field Detail

SYSTEM_PORT

public static final int SYSTEM_PORT
The port, used by the activation system. The value is equal to 1098 by default, but it can be changed by putting the system property .

See Also:
Constant Field Values
Method Detail

registerObject

public ActivationID registerObject(ActivationDesc desc)
                            throws ActivationException,
                                   UnknownGroupException,
                                   java.rmi.RemoteException
Registers the activation descriptor and creates (and returns) its activation identifier. The map entry (identifier to descriptor) is stored in the stable map and used when the Activator receives the request to activate the object.


unregisterObject

public void unregisterObject(ActivationID id)
                      throws ActivationException,
                             UnknownObjectException,
                             java.rmi.RemoteException
Removes the stored identifier-description map entry. The object will no longer be activable using the passed activation id


registerGroup

public ActivationGroupID registerGroup(ActivationGroupDesc groupDesc)
                                throws ActivationException,
                                       java.rmi.RemoteException
Register the new activation group. For instance, it can be one activation group per virtual machine.


activeGroup

public ActivationMonitor activeGroup(ActivationGroupID id,
                                     ActivationInstantiator group,
                                     long incarnation)
                              throws UnknownGroupException,
                                     ActivationException,
                                     java.rmi.RemoteException
This method is called from the ActivationGroup to inform the ActivatinSystem that the group is now active and there is the ActivationInstantiator for that group. This call is made internally from the ActivationGroup.createGroup(java.rmi.activation.ActivationGroupID, java.rmi.activation.ActivationGroupDesc, long) 55 .


unregisterGroup

public void unregisterGroup(ActivationGroupID id)
                     throws ActivationException,
                            UnknownGroupException,
                            java.rmi.RemoteException
Removes the activation group with the given identifier. The group calls back, informing the activator about the shutdown.


shutdown

public void shutdown()
              throws java.rmi.RemoteException
Shutdown the activation system and all associated activation groups


setActivationDesc

public ActivationDesc setActivationDesc(ActivationID id,
                                        ActivationDesc desc)
                                 throws ActivationException,
                                        UnknownObjectException,
                                        UnknownGroupException,
                                        java.rmi.RemoteException
Replace the activation descriptor for the object with the given activation id.


setActivationGroupDesc

public ActivationGroupDesc setActivationGroupDesc(ActivationGroupID groupId,
                                                  ActivationGroupDesc groupDesc)
                                           throws ActivationException,
                                                  UnknownGroupException,
                                                  java.rmi.RemoteException
Replaces the group descriptor for the group with the given group activation id.


getActivationDesc

public ActivationDesc getActivationDesc(ActivationID id)
                                 throws ActivationException,
                                        UnknownObjectException,
                                        java.rmi.RemoteException
Get the activation descriptor for the object with the given activation id.


getActivationGroupDesc

public ActivationGroupDesc getActivationGroupDesc(ActivationGroupID groupId)
                                           throws ActivationException,
                                                  UnknownGroupException,
                                                  java.rmi.RemoteException
Get the group descriptor for the group with the given id.