org.objectweb.jass.as
Class ActivityManagerImpl

java.lang.Object
  extended byorg.objectweb.jass.as.UserActivityImpl
      extended byorg.objectweb.jass.as.ActivityManagerImpl
All Implemented Interfaces:
javax.activity.ActivityManager, java.io.Serializable, javax.activity.UserActivity

public class ActivityManagerImpl
extends UserActivityImpl
implements javax.activity.ActivityManager, java.io.Serializable

Implements the extended AS access interface (ActivityManager) available to HLSs and container. Currently, it only implements the suspend/resume methods.

Author:
fran Date: Feb 16, 2004 org.objectweb.jass.asActivityManagerImpl.java
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.jass.as.UserActivityImpl
CHILDLIFETIME_SS_NAME, DEFAULT_TIMEOUT, SYNCHRONIZATION_SS_NAME
 
Constructor Summary
ActivityManagerImpl()
          Default constructor.
 
Method Summary
 javax.activity.GlobalId hibernate()
          Not yet implemented.
 void reactivate(javax.activity.GlobalId globalId)
          Not yet implemented.
 void resume(javax.activity.ActivityToken activityToken)
          Resumes the association of the Activity, and any nested Activities and transactions, represented by the ActivityToken with the calling thread of execution.
 void resumeAll(javax.activity.ActivityToken activityToken)
          Not yet implemented.
 void resumeGroup(javax.activity.ActivityToken activityToken)
          Not yet implemented.
 javax.activity.ActivityToken suspend()
          Suspends the association of the current Activity from the calling thread of execution along with any child Activities of the same ContextGroup nested within that Activity.
 javax.activity.ActivityToken suspendAll()
          Not yet implemented.
 javax.activity.ActivityToken suspendGroup()
          Not yet implemented.
 
Methods inherited from class org.objectweb.jass.as.UserActivityImpl
begin, broadcast, complete, completeWithStatus, forget, getCompletionStatus, getCoordinator, getGlobalId, getInstances, getName, getNumberOfActivities, getParentCoordinator, getPropertyGroup, getService, getStatus, getTimeout, recover, recreate, registerService, setActivityIdGenerator, setCompletionStatus, setTimeout
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.activity.UserActivity
begin, broadcast, complete, completeWithStatus, forget, getCompletionStatus, getCoordinator, getGlobalId, getName, getParentCoordinator, getPropertyGroup, getService, getStatus, getTimeout, recover, recreate, registerService, setCompletionStatus, setTimeout
 

Constructor Detail

ActivityManagerImpl

public ActivityManagerImpl()
Default constructor.

Method Detail

suspend

public javax.activity.ActivityToken suspend()
                                     throws javax.activity.ServiceNotRegisteredException,
                                            javax.activity.SystemException
Suspends the association of the current Activity from the calling thread of execution along with any child Activities of the same ContextGroup nested within that Activity. If the suspended Activity is nested within a parent then the parent Activity becomes associated with the thread on completion of this method.

Specified by:
suspend in interface javax.activity.ActivityManager
Returns:
An ActivityToken representing the suspended Activity. This ActivityToken maintains knowledge of the nested Activities and transactions that were suspended when the target Activity was suspended as well as any parent Activity that was established as a result of the suspend operation. The ActivityToken may be used on a subsequent call to resume but not to resumeAll or resumeGroup. If the calling thread is not associated with any Activity then null is returned.
Throws:
javax.activity.ServiceNotRegisteredException - - Thrown if no ServiceManager has been registered.
javax.activity.SystemException

resume

public void resume(javax.activity.ActivityToken activityToken)
            throws javax.activity.InvalidActivityException,
                   javax.activity.InvalidParentContextException,
                   javax.activity.ServiceNotRegisteredException,
                   javax.activity.SystemException
Resumes the association of the Activity, and any nested Activities and transactions, represented by the ActivityToken with the calling thread of execution. The ActivityToken represents a hierarchy of one of more Activities and transactions and must have been obtained by a prior call to suspend. If there is an Activity associated with the thread prior to the method invocation then the re-associated Activity is resumed as a child of the Activity that is already on the thread. Any such parent Activity must be the same parent Activity within which the child Activity was originally begun. If the specified ActivityToken is null, then no new associated is made.

Specified by:
resume in interface javax.activity.ActivityManager
Parameters:
activityToken - - the ActivityToken to resume. The ActivityToken represents a hierarchy of one of more Activities and transactions and must have been obtained by a prior call to suspend.
Throws:
javax.activity.InvalidActivityException - - May be thrown if the specified ActivityToken was not obtained by a prior call to suspend or if the ActivityToken does not represent a valid Activity or Activity hierarchy. No new association is made.
javax.activity.InvalidParentContextException - - Thrown if the parent Activity is different from that in which the resumed Activity was begun. No new association is made.
javax.activity.ServiceNotRegisteredException - - Thrown if no ServiceManager has been registered.
javax.activity.SystemException

suspendGroup

public javax.activity.ActivityToken suspendGroup()
                                          throws javax.activity.ServiceNotRegisteredException,
                                                 javax.activity.SystemException
Not yet implemented.

Specified by:
suspendGroup in interface javax.activity.ActivityManager
Throws:
javax.activity.ServiceNotRegisteredException
javax.activity.SystemException

resumeGroup

public void resumeGroup(javax.activity.ActivityToken activityToken)
                 throws javax.activity.InvalidActivityException,
                        javax.activity.InvalidParentContextException,
                        javax.activity.ServiceNotRegisteredException,
                        javax.activity.SystemException
Not yet implemented.

Specified by:
resumeGroup in interface javax.activity.ActivityManager
Throws:
javax.activity.InvalidActivityException
javax.activity.InvalidParentContextException
javax.activity.ServiceNotRegisteredException
javax.activity.SystemException

suspendAll

public javax.activity.ActivityToken suspendAll()
                                        throws javax.activity.ServiceNotRegisteredException,
                                               javax.activity.SystemException
Not yet implemented.

Specified by:
suspendAll in interface javax.activity.ActivityManager
Throws:
javax.activity.ServiceNotRegisteredException
javax.activity.SystemException

resumeAll

public void resumeAll(javax.activity.ActivityToken activityToken)
               throws javax.activity.InvalidActivityException,
                      javax.activity.InvalidParentContextException,
                      javax.activity.ServiceNotRegisteredException,
                      javax.activity.SystemException
Not yet implemented.

Specified by:
resumeAll in interface javax.activity.ActivityManager
Throws:
javax.activity.InvalidActivityException
javax.activity.InvalidParentContextException
javax.activity.ServiceNotRegisteredException
javax.activity.SystemException

hibernate

public javax.activity.GlobalId hibernate()
                                  throws javax.activity.ServiceNotRegisteredException,
                                         javax.activity.InvalidActivityException,
                                         javax.activity.SystemException
Not yet implemented.

Specified by:
hibernate in interface javax.activity.ActivityManager
Throws:
javax.activity.ServiceNotRegisteredException
javax.activity.InvalidActivityException
javax.activity.SystemException

reactivate

public void reactivate(javax.activity.GlobalId globalId)
                throws javax.activity.ActivityCompletedException,
                       javax.activity.InvalidParentContextException,
                       javax.activity.ServiceNotRegisteredException,
                       javax.activity.SystemException
Not yet implemented.

Specified by:
reactivate in interface javax.activity.ActivityManager
Throws:
javax.activity.ActivityCompletedException
javax.activity.InvalidParentContextException
javax.activity.ServiceNotRegisteredException
javax.activity.SystemException