org.smartcomps.twister.engine.priv.core.dynamic.impl
Class PickECImpl

java.lang.Object
  |
  +--org.smartcomps.twister.engine.priv.core.dynamic.impl.ExecutionContextImpl
        |
        +--org.smartcomps.twister.engine.priv.core.dynamic.impl.StructuredECImpl
              |
              +--org.smartcomps.twister.engine.priv.core.dynamic.impl.PickECImpl
All Implemented Interfaces:
java.lang.Comparable, ExecutionContext, PickEC, StructuredEC

public class PickECImpl
extends StructuredECImpl
implements PickEC

Persistent implementation of the PickEC interface.

See Also:
Pick

Field Summary
 
Fields inherited from class org.smartcomps.twister.engine.priv.core.dynamic.impl.ExecutionContextImpl
log
 
Fields inherited from interface org.smartcomps.twister.engine.priv.core.dynamic.ExecutionContext
ACTIVE, CANCELED, COMPLETED, ENDED_CANCELED, ENDED_COMPLETED, ENDED_FAULTED, FAULTED, OPEN
 
Constructor Summary
PickECImpl()
           
 
Method Summary
 void acknowledgeMessage(org.smartcomps.twister.engine.priv.core.definition.Activity activity, org.dom4j.Document message)
          Tells the pick execution context that a message has been received targeted at an activity of one of its message events.
 void execute()
           
 org.smartcomps.twister.engine.priv.core.definition.Activity getActivityForChildContext(org.smartcomps.twister.engine.priv.core.dynamic.ExecutionContext ec)
          Returns the origin activity of the passed child execution context.
 int getExecutedActivityIndex()
           
 org.smartcomps.twister.engine.priv.core.dynamic.ExecutionContext getExecution(org.smartcomps.twister.engine.priv.core.definition.Activity childActivity)
          Returns the execution context created in this structured execution from the provided activity.
 void notifyAlarm(int activityPos)
          Notifies that the alarm event of the activity at activityPos in this structured activity has been fired, meaning the pick execution context has expired and the activity declared to be executed in that case must be executed.
 void notifyExecution(org.smartcomps.twister.engine.priv.core.dynamic.ExecutionContext ec)
          Notifies the container that an activity within it is starting execution.
 void notifyTermination(org.smartcomps.twister.engine.priv.core.dynamic.ExecutionContext ec)
          Notifies the container that an activity within it has ended its termination.
 void setExecutedActivityIndex(int executedActivityIndex)
           
 
Methods inherited from class org.smartcomps.twister.engine.priv.core.dynamic.impl.StructuredECImpl
addExecutionContext, getActivity, getExecutionContexts, getExecutionContextsSet, setActivity, setExecutionContextsSet
 
Methods inherited from class org.smartcomps.twister.engine.priv.core.dynamic.impl.ExecutionContextImpl
addEvent, compareTo, completeChildren, fetchInstance, getContainer, getEvents, getExecutionContextFactory, getId, getIndex, getInitialActivity, getInstance, getProcessInstance, getStatus, getVariableXAO, notifyExecutionToContainer, notifyTerminationToContainer, setContainer, setEvents, setId, setIndex, setInstance, setProcessInstance, setStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.smartcomps.twister.engine.priv.core.dynamic.StructuredEC
addExecutionContext, getActivity, getExecutionContexts, setActivity
 
Methods inherited from interface org.smartcomps.twister.engine.priv.core.dynamic.ExecutionContext
fetchInstance, getContainer, getEvents, getId, getInstance, getStatus, setStatus
 

Constructor Detail

PickECImpl

public PickECImpl()
Method Detail

getExecutedActivityIndex

public int getExecutedActivityIndex()

setExecutedActivityIndex

public void setExecutedActivityIndex(int executedActivityIndex)

execute

public void execute()
Specified by:
execute in interface ExecutionContext

notifyExecution

public void notifyExecution(org.smartcomps.twister.engine.priv.core.dynamic.ExecutionContext ec)
Description copied from class: StructuredECImpl
Notifies the container that an activity within it is starting execution.

Specified by:
notifyExecution in interface StructuredEC
Specified by:
notifyExecution in class StructuredECImpl

notifyTermination

public void notifyTermination(org.smartcomps.twister.engine.priv.core.dynamic.ExecutionContext ec)
Description copied from class: StructuredECImpl
Notifies the container that an activity within it has ended its termination.

Specified by:
notifyTermination in interface StructuredEC
Specified by:
notifyTermination in class StructuredECImpl

getActivityForChildContext

public org.smartcomps.twister.engine.priv.core.definition.Activity getActivityForChildContext(org.smartcomps.twister.engine.priv.core.dynamic.ExecutionContext ec)
Description copied from interface: StructuredEC
Returns the origin activity of the passed child execution context.

Specified by:
getActivityForChildContext in interface StructuredEC
Specified by:
getActivityForChildContext in class StructuredECImpl
Parameters:
ec - the execution context to get origin activity for
Returns:

notifyAlarm

public void notifyAlarm(int activityPos)
Description copied from interface: PickEC
Notifies that the alarm event of the activity at activityPos in this structured activity has been fired, meaning the pick execution context has expired and the activity declared to be executed in that case must be executed.

Specified by:
notifyAlarm in interface PickEC
Parameters:
activityPos -

acknowledgeMessage

public void acknowledgeMessage(org.smartcomps.twister.engine.priv.core.definition.Activity activity,
                               org.dom4j.Document message)
Description copied from interface: PickEC
Tells the pick execution context that a message has been received targeted at an activity of one of its message events.

Specified by:
acknowledgeMessage in interface PickEC
Parameters:
activity -
message -

getExecution

public org.smartcomps.twister.engine.priv.core.dynamic.ExecutionContext getExecution(org.smartcomps.twister.engine.priv.core.definition.Activity childActivity)
Description copied from interface: StructuredEC
Returns the execution context created in this structured execution from the provided activity. If several execution contexts exist (like for a WhileEC for example), only the last created is returned.

Specified by:
getExecution in interface StructuredEC
Specified by:
getExecution in class StructuredECImpl
Parameters:
childActivity -
Returns:
Collection of execution contexts corresponding to the provided activity


Copyright © 2003 SmartComps. All Rights Reserved.