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

Quick Search    Search Deep

gnu.java.rmi.activation
Class ActivationSystemTransient  view ActivationSystemTransient download ActivationSystemTransient.java

java.lang.Object
  extended bygnu.java.rmi.activation.DefaultActivationSystem
      extended bygnu.java.rmi.activation.ActivationSystemTransient
All Implemented Interfaces:
java.rmi.activation.ActivationMonitor, java.rmi.activation.ActivationSystem, java.rmi.activation.Activator, java.rmi.Remote

public class ActivationSystemTransient
extends DefaultActivationSystem
implements java.rmi.activation.ActivationSystem, java.rmi.activation.ActivationMonitor, java.rmi.activation.Activator

Provides the default transient activation system.


Field Summary
protected  java.util.Map activatedObjects
          The cache of the activated objects, maps activation ids to remote object stubs.
static boolean debug
          Set to true to print the event messages to console.
protected  BidiTable descriptions
          Maps object identifiers into object activation descriptions
protected  BidiTable groupDescs
          Maps group identifiers into group descriptions.
(package private) static long groupIncarnations
          The object incarnation counter.
protected  java.util.Map groupInstantiators
          Maps group identifiers into already activated groups.
(package private) static java.rmi.activation.ActivationSystem singleton
          The singleton of this activation system
 
Fields inherited from class gnu.java.rmi.activation.DefaultActivationSystem
ACTIVATION_REGISTRY_PORT, ACTIVATION_SYSTEM_NAME, AS_PORT_PROPERTY, system
 
Fields inherited from interface java.rmi.activation.ActivationSystem
SYSTEM_PORT
 
Constructor Summary
protected ActivationSystemTransient()
          Creates the group with transient maps.
protected ActivationSystemTransient(BidiTable objectDescriptions, BidiTable groupDescriptiopns)
          Creates the group which uses the given maps to store the data.
 
Method Summary
 java.rmi.MarshalledObject activate(java.rmi.activation.ActivationID id, boolean force)
          Activate the given object (try cache first if force = false)
 java.rmi.activation.ActivationMonitor activeGroup(java.rmi.activation.ActivationGroupID id, java.rmi.activation.ActivationInstantiator group, long incarnation)
          Returns the activation monitor (THIS) and remebers the instantiator, used by that group.
 void activeObject(java.rmi.activation.ActivationID id, java.rmi.MarshalledObject obj)
          Put the object into active object map.
 java.rmi.activation.ActivationDesc getActivationDesc(java.rmi.activation.ActivationID id)
          Get the activation descriptor for the given activation id.
 java.rmi.activation.ActivationGroupDesc getActivationGroupDesc(java.rmi.activation.ActivationGroupID groupId)
          Get the descriptor of the given activation group.
static java.rmi.activation.ActivationSystem getInstance()
           
 void inactiveGroup(java.rmi.activation.ActivationGroupID groupId, long incarnation)
          Check if the group is known.
 void inactiveObject(java.rmi.activation.ActivationID id)
          Removes this id from the active object cache.
 java.rmi.activation.ActivationGroupID registerGroup(java.rmi.activation.ActivationGroupDesc groupDesc)
          Create the activation group id and put this id-descriptor combination into the group map.
 java.rmi.activation.ActivationID registerObject(java.rmi.activation.ActivationDesc desc)
          Create the object activation id and put this id-descriptor combination into the group map.
 java.rmi.activation.ActivationDesc setActivationDesc(java.rmi.activation.ActivationID id, java.rmi.activation.ActivationDesc desc)
          Replace the activation descriptor, return the previous descriptor.
 java.rmi.activation.ActivationGroupDesc setActivationGroupDesc(java.rmi.activation.ActivationGroupID groupId, java.rmi.activation.ActivationGroupDesc groupDesc)
          Replace the activation group descriptor, return the previous descriptor.
 void shutdown()
          Calls .shutdown on all bidirectional tables (has no effect if these table are not persistent).
 void unregisterGroup(java.rmi.activation.ActivationGroupID groupId)
          Remove the group from the group map
 void unregisterObject(java.rmi.activation.ActivationID id)
          Remove the object id from the active object and description maps.
 
Methods inherited from class gnu.java.rmi.activation.DefaultActivationSystem
get
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

groupDescs

protected final BidiTable groupDescs
Maps group identifiers into group descriptions.


descriptions

protected final BidiTable descriptions
Maps object identifiers into object activation descriptions


groupInstantiators

protected final transient java.util.Map groupInstantiators
Maps group identifiers into already activated groups.


activatedObjects

protected final transient java.util.Map activatedObjects
The cache of the activated objects, maps activation ids to remote object stubs.


groupIncarnations

static long groupIncarnations
The object incarnation counter.


singleton

static java.rmi.activation.ActivationSystem singleton
The singleton of this activation system


debug

public static boolean debug
Set to true to print the event messages to console.

Constructor Detail

ActivationSystemTransient

protected ActivationSystemTransient(BidiTable objectDescriptions,
                                    BidiTable groupDescriptiopns)
Creates the group which uses the given maps to store the data.


ActivationSystemTransient

protected ActivationSystemTransient()
Creates the group with transient maps.

Method Detail

getInstance

public static java.rmi.activation.ActivationSystem getInstance()

activate

public java.rmi.MarshalledObject activate(java.rmi.activation.ActivationID id,
                                          boolean force)
                                   throws java.rmi.activation.ActivationException,
                                          java.rmi.activation.UnknownObjectException,
                                          java.rmi.RemoteException
Activate the given object (try cache first if force = false)

Specified by:
activate in interface java.rmi.activation.Activator

activeGroup

public java.rmi.activation.ActivationMonitor activeGroup(java.rmi.activation.ActivationGroupID id,
                                                         java.rmi.activation.ActivationInstantiator group,
                                                         long incarnation)
                                                  throws java.rmi.activation.UnknownGroupException,
                                                         java.rmi.activation.ActivationException,
                                                         java.rmi.RemoteException
Returns the activation monitor (THIS) and remebers the instantiator, used by that group.

Specified by:
activeGroup in interface java.rmi.activation.ActivationSystem

getActivationDesc

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

Specified by:
getActivationDesc in interface java.rmi.activation.ActivationSystem

getActivationGroupDesc

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

Specified by:
getActivationGroupDesc in interface java.rmi.activation.ActivationSystem

registerGroup

public java.rmi.activation.ActivationGroupID registerGroup(java.rmi.activation.ActivationGroupDesc groupDesc)
                                                    throws java.rmi.activation.ActivationException,
                                                           java.rmi.RemoteException
Create the activation group id and put this id-descriptor combination into the group map. The new ID will only be created if this description has not already been registered, otherwise the id of the registered description will be returned.

Specified by:
registerGroup in interface java.rmi.activation.ActivationSystem

registerObject

public java.rmi.activation.ActivationID registerObject(java.rmi.activation.ActivationDesc desc)
                                                throws java.rmi.activation.ActivationException,
                                                       java.rmi.activation.UnknownGroupException,
                                                       java.rmi.RemoteException
Create the object activation id and put this id-descriptor combination into the group map. The new ID will only be created if this description has not already been registered, otherwise the id of the registered description will be returned.

Specified by:
registerObject in interface java.rmi.activation.ActivationSystem

setActivationDesc

public java.rmi.activation.ActivationDesc setActivationDesc(java.rmi.activation.ActivationID id,
                                                            java.rmi.activation.ActivationDesc desc)
                                                     throws java.rmi.activation.ActivationException,
                                                            java.rmi.activation.UnknownObjectException,
                                                            java.rmi.activation.UnknownGroupException,
                                                            java.rmi.RemoteException
Replace the activation descriptor, return the previous descriptor.

Specified by:
setActivationDesc in interface java.rmi.activation.ActivationSystem

setActivationGroupDesc

public java.rmi.activation.ActivationGroupDesc setActivationGroupDesc(java.rmi.activation.ActivationGroupID groupId,
                                                                      java.rmi.activation.ActivationGroupDesc groupDesc)
                                                               throws java.rmi.activation.ActivationException,
                                                                      java.rmi.activation.UnknownGroupException,
                                                                      java.rmi.RemoteException
Replace the activation group descriptor, return the previous descriptor.

Specified by:
setActivationGroupDesc in interface java.rmi.activation.ActivationSystem

shutdown

public void shutdown()
              throws java.rmi.RemoteException
Calls .shutdown on all bidirectional tables (has no effect if these table are not persistent).

Specified by:
shutdown in interface java.rmi.activation.ActivationSystem

unregisterGroup

public void unregisterGroup(java.rmi.activation.ActivationGroupID groupId)
                     throws java.rmi.activation.ActivationException,
                            java.rmi.activation.UnknownGroupException,
                            java.rmi.RemoteException
Remove the group from the group map

Specified by:
unregisterGroup in interface java.rmi.activation.ActivationSystem

unregisterObject

public void unregisterObject(java.rmi.activation.ActivationID id)
                      throws java.rmi.activation.ActivationException,
                             java.rmi.activation.UnknownObjectException,
                             java.rmi.RemoteException
Remove the object id from the active object and description maps.

Specified by:
unregisterObject in interface java.rmi.activation.ActivationSystem

activeObject

public void activeObject(java.rmi.activation.ActivationID id,
                         java.rmi.MarshalledObject obj)
                  throws java.rmi.activation.UnknownObjectException,
                         java.rmi.RemoteException
Put the object into active object map.

Specified by:
activeObject in interface java.rmi.activation.ActivationMonitor

inactiveGroup

public void inactiveGroup(java.rmi.activation.ActivationGroupID groupId,
                          long incarnation)
                   throws java.rmi.activation.UnknownGroupException,
                          java.rmi.RemoteException
Check if the group is known. Remove all active objects, belonging to that group, from the active object cache.

Specified by:
inactiveGroup in interface java.rmi.activation.ActivationMonitor

inactiveObject

public void inactiveObject(java.rmi.activation.ActivationID id)
                    throws java.rmi.activation.UnknownObjectException,
                           java.rmi.RemoteException
Removes this id from the active object cache.

Specified by:
inactiveObject in interface java.rmi.activation.ActivationMonitor