org.objectweb.jass.hls.ont
Class ONTCompletionSS

java.lang.Object
  extended byorg.objectweb.jass.hls.ont.ONTCompletionSS
All Implemented Interfaces:
javax.activity.coordination.SignalSet

public class ONTCompletionSS
extends java.lang.Object
implements javax.activity.coordination.SignalSet

Implements the ONT completion signal set. It is triggered when a ONT activity ends. The ONT signal set provides the activity_committed and activity_rolledback signals, and responds appropriately to the outcomes that are generated in response to those signals.

Author:
fran Date: Feb 12, 2004 org.objectweb.jass.hls.ontONTCompletionSS.java

Field Summary
static java.lang.String COMPLETION_SS_NAME
           
 
Constructor Summary
ONTCompletionSS()
          ONT completion signal set constructor.
 
Method Summary
 void destroy()
          Clears the main attributes.
 int getCompletionStatus()
          Returns the completion status for the activity as the SignalSet has recorded it.
 javax.activity.Outcome getOutcome()
          Returns the consolidated outcome of the signal set following the completion of signaling.
 javax.activity.Signal getSignal()
          Returns the next signal to be sent to the actions registered for the ONT completion signal set.
 java.lang.String getSignalSetName()
          Returns the name of the target SignalSet.
 void setActivityCoordinator(javax.activity.ActivityCoordinator coord)
          Sets the activity coordinator for this instance.
 void setCompletionStatus(int completionStatus, int status)
          Set both the completion status and status before any signals are requested.
 javax.activity.CoordinationInformation setResponse(javax.activity.Outcome response)
          Called by an ActivityCoordinator to notify the target SignalSet of the Outcome returned by an Action in response to a signal produced by the ONT signal set.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPLETION_SS_NAME

public static final java.lang.String COMPLETION_SS_NAME
See Also:
Constant Field Values
Constructor Detail

ONTCompletionSS

public ONTCompletionSS()
ONT completion signal set constructor.

Method Detail

getSignalSetName

public java.lang.String getSignalSetName()
Returns the name of the target SignalSet.

Specified by:
getSignalSetName in interface javax.activity.coordination.SignalSet

getSignal

public javax.activity.Signal getSignal()
Returns the next signal to be sent to the actions registered for the ONT completion signal set. If the completion status is success then the activity_committed signal is returned. In this case, if the completing activity is nested the parent is attached to the signal. If completion status is fail, then activity_rollback is returned.

Specified by:
getSignal in interface javax.activity.coordination.SignalSet

setResponse

public javax.activity.CoordinationInformation setResponse(javax.activity.Outcome response)
                                                   throws javax.activity.SignalSetInactiveException
Called by an ActivityCoordinator to notify the target SignalSet of the Outcome returned by an Action in response to a signal produced by the ONT signal set. If parent_has_completed is received, the signal set indicates to the ActivityCoordinator that a subsequent signal (activity_rolledback signal) shall be distributed. It returns the parent_has_completed outcome. If parent_add_failed is received, the signal set indicates to the ActivityCoordinator that a subsequent signal (activity_rolledback signal) shall be distributed. It returns the parent_add_failed outcome. If compensate_failed is received, the signal set indicates to the ActivityCoordinator that the same sinal (remember it was activity_rolledback) must be sent to any remaining actions, but no further signals are distributed.

Specified by:
setResponse in interface javax.activity.coordination.SignalSet
Throws:
javax.activity.SignalSetInactiveException

getOutcome

public javax.activity.Outcome getOutcome()
                                  throws javax.activity.SignalSetActiveException
Returns the consolidated outcome of the signal set following the completion of signaling.

Specified by:
getOutcome in interface javax.activity.coordination.SignalSet
Throws:
javax.activity.SignalSetActiveException

setCompletionStatus

public void setCompletionStatus(int completionStatus,
                                int status)
Set both the completion status and status before any signals are requested. The signals produced may be influenced by these two statuses.

Specified by:
setCompletionStatus in interface javax.activity.coordination.SignalSet

getCompletionStatus

public int getCompletionStatus()
                        throws javax.activity.SignalSetActiveException
Returns the completion status for the activity as the SignalSet has recorded it.

Specified by:
getCompletionStatus in interface javax.activity.coordination.SignalSet
Throws:
javax.activity.SignalSetActiveException

setActivityCoordinator

public void setActivityCoordinator(javax.activity.ActivityCoordinator coord)
                            throws javax.activity.SignalSetActiveException
Sets the activity coordinator for this instance.

Specified by:
setActivityCoordinator in interface javax.activity.coordination.SignalSet
Throws:
javax.activity.SignalSetActiveException

destroy

public void destroy()
Clears the main attributes.

Specified by:
destroy in interface javax.activity.coordination.SignalSet