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

Quick Search    Search Deep

gnu.classpath.tools.rmi.rmid
Class ActivationSystemImpl  view ActivationSystemImpl download ActivationSystemImpl.java

java.lang.Object
  extended bygnu.java.rmi.activation.DefaultActivationSystem
      extended bygnu.java.rmi.activation.ActivationSystemTransient
          extended bygnu.classpath.tools.rmi.rmid.ActivationSystemImpl
All Implemented Interfaces:
java.rmi.activation.ActivationMonitor, java.rmi.activation.ActivationSystem, java.rmi.activation.Activator, java.rmi.Remote, java.io.Serializable

public class ActivationSystemImpl
extends gnu.java.rmi.activation.ActivationSystemTransient
implements java.rmi.activation.ActivationSystem, java.rmi.activation.Activator, java.rmi.activation.ActivationMonitor, java.io.Serializable

Implements the rmid activation system.


Field Summary
private static long serialVersionUID
          Use for interoperability.
static ActivationSystemImpl singleton2
          The singleton instance of this class.
 
Fields inherited from class gnu.java.rmi.activation.ActivationSystemTransient
activatedObjects, debug, descriptions, groupDescs, groupInstantiators
 
Fields inherited from class gnu.java.rmi.activation.DefaultActivationSystem
 
Fields inherited from interface java.rmi.activation.ActivationSystem
SYSTEM_PORT
 
Constructor Summary
protected ActivationSystemImpl(java.io.File folder, boolean cold)
          Creates the group with transient maps.
 
Method Summary
 java.rmi.MarshalledObject activate(java.rmi.activation.ActivationID id, boolean force)
          Activate the object, associated with the given activation identifier.
 java.rmi.activation.ActivationMonitor activeGroup(java.rmi.activation.ActivationGroupID id, java.rmi.activation.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 java.rmi.activation.ActivationInstantiator for that group.
 void activeObject(java.rmi.activation.ActivationID id, java.rmi.MarshalledObject obj)
          Informs that the object is now active.
 java.rmi.activation.ActivationDesc getActivationDesc(java.rmi.activation.ActivationID id)
          Get the activation descriptor for the object with the given activation id.
 java.rmi.activation.ActivationGroupDesc getActivationGroupDesc(java.rmi.activation.ActivationGroupID groupId)
          Get the group descriptor for the group with the given id.
static java.rmi.activation.ActivationSystem getInstance(java.io.File folder, boolean cold)
          Obtain the singleton instance of this class.
 void inactiveGroup(java.rmi.activation.ActivationGroupID groupId, long incarnation)
          Informs that the whole group is now inactive because all group objects are inactive.
 void inactiveObject(java.rmi.activation.ActivationID id)
          Informs that the object is not inactive.
private  void readObject(java.io.ObjectInputStream in)
          Read the object from the input stream.
 java.rmi.activation.ActivationGroupID registerGroup(java.rmi.activation.ActivationGroupDesc groupDesc)
          Register the new activation group.
 java.rmi.activation.ActivationID registerObject(java.rmi.activation.ActivationDesc desc)
          Registers the activation descriptor and creates (and returns) its activation identifier.
 java.rmi.activation.ActivationDesc setActivationDesc(java.rmi.activation.ActivationID id, java.rmi.activation.ActivationDesc desc)
          Replace the activation descriptor for the object with the given activation id.
 java.rmi.activation.ActivationGroupDesc setActivationGroupDesc(java.rmi.activation.ActivationGroupID groupId, java.rmi.activation.ActivationGroupDesc groupDesc)
          Replaces the group descriptor for the group with the given group activation id.
 void shutdown()
          This method saves the state of the activation system and then terminates in 10 seconds.
 void unregisterGroup(java.rmi.activation.ActivationGroupID groupId)
          Removes the activation group with the given identifier.
 void unregisterObject(java.rmi.activation.ActivationID id)
          Removes the stored identifier-description map entry.
private  void writeObject(java.io.ObjectOutputStream out)
          Write the object to the output stream.
 
Methods inherited from class gnu.java.rmi.activation.ActivationSystemTransient
getInstance
 
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

serialVersionUID

private static final long serialVersionUID
Use for interoperability.

See Also:
Constant Field Values

singleton2

public static ActivationSystemImpl singleton2
The singleton instance of this class.

Constructor Detail

ActivationSystemImpl

protected ActivationSystemImpl(java.io.File folder,
                               boolean cold)
Creates the group with transient maps.

Method Detail

getInstance

public static java.rmi.activation.ActivationSystem getInstance(java.io.File folder,
                                                               boolean cold)
Obtain the singleton instance of this class.


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
Description copied from interface: java.rmi.activation.Activator
Activate the object, associated with the given activation identifier. The activator looks for the java.rmi.activation.ActivationDescriptor for the passed identifier, determines the object activation group and initiates object recreation either via java.rmi.activation.ActivationInstantiator or via Class.newInstance()>Class.newInstance() 55 .

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
Description copied from interface: java.rmi.activation.ActivationSystem
This method is called from the java.rmi.activation.ActivationGroup to inform the ActivatinSystem that the group is now active and there is the java.rmi.activation.ActivationInstantiator for that group. This call is made internally from the ActivationGroup.createGroup(java.rmi.activation.ActivationGroupID, java.rmi.activation.ActivationGroupDesc, long)>ActivationGroup.createGroup(java.rmi.activation.ActivationGroupID, java.rmi.activation.ActivationGroupDesc, long) 55 .

Specified by:
activeGroup 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
Description copied from interface: java.rmi.activation.ActivationMonitor
Informs that the object is now active.

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

getActivationDesc

public java.rmi.activation.ActivationDesc getActivationDesc(java.rmi.activation.ActivationID id)
                                                     throws java.rmi.activation.ActivationException,
                                                            java.rmi.activation.UnknownObjectException,
                                                            java.rmi.RemoteException
Description copied from interface: java.rmi.activation.ActivationSystem
Get the activation descriptor for the object with 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
Description copied from interface: java.rmi.activation.ActivationSystem
Get the group descriptor for the group with the given id.

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

inactiveGroup

public void inactiveGroup(java.rmi.activation.ActivationGroupID groupId,
                          long incarnation)
                   throws java.rmi.activation.UnknownGroupException,
                          java.rmi.RemoteException
Description copied from interface: java.rmi.activation.ActivationMonitor
Informs that the whole group is now inactive because all group objects are inactive. The group will be recreated upon the later request to activate any object, belonging to the group.

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
Description copied from interface: java.rmi.activation.ActivationMonitor
Informs that the object is not inactive.

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

registerGroup

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

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
Description copied from interface: java.rmi.activation.ActivationSystem
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 java.rmi.activation.Activator receives the request to activate the object.

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
Description copied from interface: java.rmi.activation.ActivationSystem
Replace the activation descriptor for the object with the given activation id.

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
Description copied from interface: java.rmi.activation.ActivationSystem
Replaces the group descriptor for the group with the given group activation id.

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

shutdown

public void shutdown()
              throws java.rmi.RemoteException
This method saves the state of the activation system and then terminates in 10 seconds.

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
Description copied from interface: java.rmi.activation.ActivationSystem
Removes the activation group with the given identifier. The group calls back, informing the activator about the shutdown.

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
Description copied from interface: java.rmi.activation.ActivationSystem
Removes the stored identifier-description map entry. The object will no longer be activable using the passed activation id

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

readObject

private void readObject(java.io.ObjectInputStream in)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Read the object from the input stream.


writeObject

private void writeObject(java.io.ObjectOutputStream out)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Write the object to the output stream.