org.smartcomps.twister.engine.priv.messaging.impl
Class PickAsReceive

java.lang.Object
  |
  +--org.smartcomps.twister.engine.priv.messaging.impl.PickAsReceive
All Implemented Interfaces:
Activity, BasicActivity, Receive

public class PickAsReceive
extends java.lang.Object
implements Receive

This class is a wrapper around the MessageEvent of a Pick structured activity to use it just as using a Receive. This way our MessageController implementation just consider Receive activities and we don't have to worry about always differentiating the two cases : Receive and Pick MessageEvent.

See Also:
MessageController, Receive, Pick, MessageEvent

Constructor Summary
PickAsReceive(org.smartcomps.twister.engine.priv.core.definition.Pick pick, int eventPos)
           
 
Method Summary
 void addCorrelation(org.smartcomps.twister.engine.priv.core.definition.CorrelationRef correlationRef)
           
 org.smartcomps.twister.engine.priv.core.dynamic.ExecutionContext execute(java.lang.String correlationSetName, java.util.Map correlation)
           
 org.smartcomps.twister.engine.priv.core.definition.TwisterProcess fetchProcess()
          This method browse the activity containment hierarchy to fetch the process this activity is included in.
 org.smartcomps.twister.engine.priv.core.definition.StructuredActivity getContainer()
          An Activity is contained either in a TwisterProcess of in a StructuredActivity, therefore this method will return the StructuredActivity containing this activity only if it's not the root activity.
 java.util.Collection getCorrelations()
           
 int getEventPos()
           
 java.lang.String getJoinCondition()
           
 java.lang.String getName()
           
 java.lang.String getOperation()
           
 java.lang.String getPartner()
           
 org.smartcomps.twister.engine.priv.core.definition.Pick getPick()
           
 java.lang.String getPortType()
           
 org.smartcomps.twister.engine.priv.core.definition.TwisterProcess getProcess()
          An Activity is contained either in a TwisterProcess of in a StructuredActivity, therefore this method will return the TwisterProcess containing this activity only if it is the root activity.
 java.util.Set getSourceLinks()
           
 java.util.Set getTargetLinks()
           
 java.lang.String getVariable()
           
 boolean isCreateInstance()
           
 void setCreateInstance(boolean createInstance)
           
 void setJoinCondition(java.lang.String expr)
           
 void setName(java.lang.String name)
           
 void setOperation(java.lang.String operation)
           
 void setPartner(java.lang.String partner)
           
 void setPortType(java.lang.String portType)
           
 void setSourceLinks(java.util.Set sources)
           
 void setTargetLinks(java.util.Set targets)
           
 void setVariable(java.lang.String variable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PickAsReceive

public PickAsReceive(org.smartcomps.twister.engine.priv.core.definition.Pick pick,
                     int eventPos)
Method Detail

getPick

public org.smartcomps.twister.engine.priv.core.definition.Pick getPick()

getEventPos

public int getEventPos()

getPartner

public java.lang.String getPartner()
Specified by:
getPartner in interface Receive

getPortType

public java.lang.String getPortType()
Specified by:
getPortType in interface Receive

getOperation

public java.lang.String getOperation()
Specified by:
getOperation in interface Receive

getVariable

public java.lang.String getVariable()
Specified by:
getVariable in interface Receive

isCreateInstance

public boolean isCreateInstance()
Specified by:
isCreateInstance in interface Receive

getCorrelations

public java.util.Collection getCorrelations()
Specified by:
getCorrelations in interface Receive

getName

public java.lang.String getName()
Specified by:
getName in interface Activity

execute

public org.smartcomps.twister.engine.priv.core.dynamic.ExecutionContext execute(java.lang.String correlationSetName,
                                                                                java.util.Map correlation)
                                                                         throws EngineException
Specified by:
execute in interface BasicActivity
EngineException

getContainer

public org.smartcomps.twister.engine.priv.core.definition.StructuredActivity getContainer()
Description copied from interface: Activity
An Activity is contained either in a TwisterProcess of in a StructuredActivity, therefore this method will return the StructuredActivity containing this activity only if it's not the root activity. For the root activity it will return null (the root activity being the activity directly in the process).

Specified by:
getContainer in interface Activity
Returns:
StructuredActivity the container of this activity, null if this activity is root

getProcess

public org.smartcomps.twister.engine.priv.core.definition.TwisterProcess getProcess()
Description copied from interface: Activity
An Activity is contained either in a TwisterProcess of in a StructuredActivity, therefore this method will return the TwisterProcess containing this activity only if it is the root activity. For other activities it will return null (the root activity being the activity directly in the process).

Specified by:
getProcess in interface Activity
Returns:
TwisterProcess the process of this activity, null for all activity that are not root

fetchProcess

public org.smartcomps.twister.engine.priv.core.definition.TwisterProcess fetchProcess()
Description copied from interface: Activity
This method browse the activity containment hierarchy to fetch the process this activity is included in.

Specified by:
fetchProcess in interface Activity
Returns:
TwisterProcess

setPartner

public void setPartner(java.lang.String partner)
Specified by:
setPartner in interface Receive

setPortType

public void setPortType(java.lang.String portType)
Specified by:
setPortType in interface Receive

setOperation

public void setOperation(java.lang.String operation)
Specified by:
setOperation in interface Receive

setVariable

public void setVariable(java.lang.String variable)
Specified by:
setVariable in interface Receive

setCreateInstance

public void setCreateInstance(boolean createInstance)
Specified by:
setCreateInstance in interface Receive

addCorrelation

public void addCorrelation(org.smartcomps.twister.engine.priv.core.definition.CorrelationRef correlationRef)
Specified by:
addCorrelation in interface Receive

setName

public void setName(java.lang.String name)
Specified by:
setName in interface Activity

getJoinCondition

public java.lang.String getJoinCondition()
Specified by:
getJoinCondition in interface Activity

setJoinCondition

public void setJoinCondition(java.lang.String expr)
Specified by:
setJoinCondition in interface Activity

getSourceLinks

public java.util.Set getSourceLinks()
Specified by:
getSourceLinks in interface Activity

setSourceLinks

public void setSourceLinks(java.util.Set sources)
Specified by:
setSourceLinks in interface Activity

getTargetLinks

public java.util.Set getTargetLinks()
Specified by:
getTargetLinks in interface Activity

setTargetLinks

public void setTargetLinks(java.util.Set targets)
Specified by:
setTargetLinks in interface Activity


Copyright © 2003 SmartComps. All Rights Reserved.