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

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.SwitchECImpl
All Implemented Interfaces:
java.lang.Comparable, ExecutionContext, StructuredEC, SwitchEC

public class SwitchECImpl
extends StructuredECImpl
implements SwitchEC

Persistent implementation of the SwitchEC interface.


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
SwitchECImpl()
           
 
Method Summary
 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 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

SwitchECImpl

public SwitchECImpl()
Method Detail

getExecutedActivityIndex

public int getExecutedActivityIndex()

setExecutedActivityIndex

public void setExecutedActivityIndex(int executedActivityIndex)

execute

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

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:

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

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.