|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jass.as.ActivityImpl
Each object of this class represents an activity and its coordinator. Implements the AS ActivityCoordinator interface in order to be able to broadcast signals to registered actions. TimeoutTarget is implemented in order to be warned of timeout.
Constructor Summary | |
ActivityImpl(ActivityService activityService,
ActivityIdImpl activityId,
ActivityImpl superior,
int timeout)
|
Method Summary | |
void |
addAction(Action action,
java.lang.String signalSetName,
int priority)
Establishes an interest relationship between the specified Action and SignalSet for the Activity represented by the target ActivityCoordinator. |
void |
addGlobalAction(Action action,
int priority)
Establishes an interest relationship between the specified Action and all SignalSets used by the Activity represented by the target ActivityCoordinator. |
void |
associateActivityManager(ActivityManager am)
Reasociates the local ActivityService with the recreated activity |
void |
associateCurrentThread()
Associates the calling thread with this activity. |
Outcome |
completeActivity(int completionStatus)
Causes the Activity associated with the target ActivityCoordinator to complete with the specified CompletionStatus. |
void |
disassociateCurrentThread()
Disassociates the calling thread from this activity. |
Action[] |
getActions(java.lang.String signalSetName)
Returns all the Actions that have been registered with an interest in the specified signalSetName. |
java.lang.String |
getCompletionSignalSetName()
Returns the name of the SignalSet, if any, that will be used for the distribution of completion signals when the current Activity completes. |
GlobalId |
getGlobalId()
Returns the GlobalId of the Activity represented by the target ActivityCoordinator. |
java.lang.String |
getName()
Returns a printable string describing the Activity represented by the target ActivityCoordinator. |
int |
getNumberRegisteredActions(java.lang.String signalSetName)
Returns the number of Actions, including global Actions, registered with the target ActivityCoordinator with an interest in the specified SignalSet. |
ActivityCoordinator |
getParent()
Returns the parent ActivityCoordinator or null if the target ActivityCoordinator represents a top-level Activity. |
int |
getParentStatus()
Returns the Status of the Activity represented by the target ActivityCoordinator's parent. |
int |
getStatus()
Returns the Status of the Activity represented by the target ActivityCoordinator. |
java.lang.String |
getStringCompletionStatus(int completionStatus)
Return the string representation of the activity completion status. |
java.lang.String |
getStringStatus(int status)
Return the string representation of the activity status. |
Outcome |
heuristicComplete(int completionStatus)
TODO NOT YET IMPLEMENTED |
boolean |
isSameActivity(ActivityCoordinator coord)
Returns true if the specified coord represents the same Activity as the target ActivityCoordinator. |
Outcome |
processSignalSet(java.lang.String signalSetName,
int completionStatus)
Causes the SignalSet specified by signalSetName to start producing signals for all registered Actions at times other than during completion. |
void |
removeAction(Action action,
java.lang.String signalSetName)
Removes the interest relationship between the specified Action and SignalSet for the Activity represented by the target ActivityCoordinator. |
void |
removeGlobalAction(Action action)
Removes the interest relationship between the specified Action and all SignalSets for the Activity represented by the target ActivityCoordinator. |
void |
setCompletionSignalSetName(java.lang.String signalSetName)
Sets the name of the SignalSet that should be used for the distribution of completion signals when the current Activity completes. |
void |
timedOut(Timeout timeout)
Called when our timeout expires. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ActivityImpl(ActivityService activityService, ActivityIdImpl activityId, ActivityImpl superior, int timeout)
Method Detail |
public void addAction(Action action, java.lang.String signalSetName, int priority) throws SignalSetUnknownException, SystemException, java.lang.IllegalStateException
addAction
in interface ActivityCoordinator
SignalSetUnknownException
SystemException
java.lang.IllegalStateException
public void addGlobalAction(Action action, int priority) throws SystemException, java.lang.IllegalStateException
addGlobalAction
in interface ActivityCoordinator
SystemException
java.lang.IllegalStateException
public void removeAction(Action action, java.lang.String signalSetName) throws ActionNotFoundException, SystemException, java.lang.IllegalStateException
removeAction
in interface ActivityCoordinator
ActionNotFoundException
SystemException
java.lang.IllegalStateException
public void removeGlobalAction(Action action) throws ActionNotFoundException, SystemException, java.lang.IllegalStateException
removeGlobalAction
in interface ActivityCoordinator
ActionNotFoundException
SystemException
java.lang.IllegalStateException
public Action[] getActions(java.lang.String signalSetName) throws SignalSetUnknownException, SystemException
getActions
in interface ActivityCoordinator
SignalSetUnknownException
SystemException
public int getNumberRegisteredActions(java.lang.String signalSetName) throws SignalSetUnknownException, SystemException
getNumberRegisteredActions
in interface ActivityCoordinator
SignalSetUnknownException
SystemException
public void setCompletionSignalSetName(java.lang.String signalSetName) throws SignalSetUnknownException, SystemException, java.lang.IllegalStateException
setCompletionSignalSetName
in interface ActivityCoordinator
SignalSetUnknownException
SystemException
java.lang.IllegalStateException
public java.lang.String getCompletionSignalSetName() throws SystemException
getCompletionSignalSetName
in interface ActivityCoordinator
SystemException
public ActivityCoordinator getParent() throws SystemException
getParent
in interface ActivityCoordinator
SystemException
public GlobalId getGlobalId() throws SystemException
getGlobalId
in interface ActivityCoordinator
SystemException
public int getStatus() throws SystemException
getStatus
in interface ActivityCoordinator
SystemException
public int getParentStatus() throws SystemException
getParentStatus
in interface ActivityCoordinator
SystemException
public java.lang.String getName() throws SystemException
getName
in interface ActivityCoordinator
SystemException
public boolean isSameActivity(ActivityCoordinator coord) throws SystemException
isSameActivity
in interface ActivityCoordinator
SystemException
public Outcome completeActivity(int completionStatus) throws ActivityPendingException, ContextPendingException, NotOriginatorException, InvalidStateException, ActivityNotProcessedException, SystemException
completeActivity
in interface ActivityCoordinator
ActivityPendingException
ContextPendingException
NotOriginatorException
InvalidStateException
ActivityNotProcessedException
SystemException
public Outcome heuristicComplete(int completionStatus) throws ActivityPendingException, ContextPendingException, InvalidStateException, ActivityNotProcessedException, SystemException
heuristicComplete
in interface ActivityCoordinator
ActivityPendingException
ContextPendingException
InvalidStateException
ActivityNotProcessedException
SystemException
public Outcome processSignalSet(java.lang.String signalSetName, int completionStatus) throws SignalSetUnknownException, ActivityNotProcessedException, InvalidActivityException, SystemException
processSignalSet
in interface ActivityCoordinator
SignalSetUnknownException
ActivityNotProcessedException
InvalidActivityException
SystemException
public void timedOut(Timeout timeout)
timedOut
in interface TimeoutTarget
public void associateCurrentThread()
associateCurrentThread
in interface ActivityCoordinator
public void disassociateCurrentThread()
disassociateCurrentThread
in interface ActivityCoordinator
public void associateActivityManager(ActivityManager am)
associateActivityManager
in interface ActivityCoordinator
am
- the activity manager interface representing the Activity
Service implementation.public java.lang.String getStringStatus(int status)
status
- the integer status to convert.
public java.lang.String getStringCompletionStatus(int completionStatus)
completionStatus
- the integer completion status to convert.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |