public class MapIt<InputType,OutputType> extends java.lang.Object implements IFunctionUnit, FunctionUnitWithOnlyOneInputPort<InputType>, FunctionUnitWithOnlyOneOutputPort<OutputType>
| Constructor and Description |
|---|
MapIt(org.eclipse.xtext.xbase.lib.Functions.Function1<? super InputType,? extends OutputType> operation)
Creates an operation unit in the sense of Flow Design which performs a mapping of input message
to an output message by applying the given operation which must be a function.
|
MapIt(java.lang.String unitName,
org.eclipse.xtext.xbase.lib.Functions.Function1<? super InputType,? extends OutputType> operation)
Creates an operation unit in the sense of Flow Design which performs a mapping of input message
to an output message by applying the given operation which must be a function.
|
| Modifier and Type | Method and Description |
|---|---|
void |
forwardIntegrationError(java.lang.Exception ex)
Method for forwarding an
Exception in case
an functional output port of that function unit has not been connected to an input port
or a side effect closure |
InputPort<InputType> |
in() |
OutputPort<java.lang.Exception> |
integrationError() |
void |
operator_lessEqualsThan(org.eclipse.xtext.xbase.lib.Functions.Function0<? extends InputType> msgClosure)
Flow DSL operator "<=" for forwarding a message value to the one and only input port for being processed.
example: |
void |
operator_lessEqualsThan(InputType msg)
Flow DSL operator "<=" for forwarding a message value to the one and only input port for being processed.
example: |
void |
operator_mappedTo(FunctionUnitWithOnlyOneInputPort<OutputType> rightSideFunctionUnit)
Flow DSL operator "->" for connecting two function units.
|
void |
operator_mappedTo(InputPort<OutputType> foreignInputPort)
Flow DSL operator "->" for connecting two function units.
|
void |
operator_mappedTo(OutputPort<OutputType> rightSideFunctionUnitOutputPort)
Flow DSL operator "->" for connecting two function units.
|
void |
operator_mappedTo(org.eclipse.xtext.xbase.lib.Procedures.Procedure1<? super OutputType> closure)
Flow DSL operator "->" for specifying an function units output message to be processed by a particular closure.
|
OutputPort<OutputType> |
out() |
InputPort<InputType> |
theOneAndOnlyInputPort() |
java.lang.String |
toString() |
public MapIt(org.eclipse.xtext.xbase.lib.Functions.Function1<? super InputType,? extends OutputType> operation)
operation - the function to be applied for mappingpublic MapIt(java.lang.String unitName,
org.eclipse.xtext.xbase.lib.Functions.Function1<? super InputType,? extends OutputType> operation)
name - the function unit name to be used for this instanceoperation - the function to be applied for mappingpublic java.lang.String toString()
toString in class java.lang.Objectpublic OutputPort<OutputType> out()
public InputPort<InputType> theOneAndOnlyInputPort()
theOneAndOnlyInputPort in interface FunctionUnitWithOnlyOneInputPort<InputType>InputPortpublic OutputPort<java.lang.Exception> integrationError()
integrationError in interface IFunctionUnitExceptions to in case
an functional output port of that function unit has not been connected to an input port
or a side effect closurepublic void forwardIntegrationError(java.lang.Exception ex)
IFunctionUnitException in case
an functional output port of that function unit has not been connected to an input port
or a side effect closureforwardIntegrationError in interface IFunctionUnitpublic void operator_lessEqualsThan(InputType msg)
FunctionUnitWithOnlyOneInputPortinput <= "some string"
operator_lessEqualsThan in interface FunctionUnitWithOnlyOneInputPort<InputType>msg - the message to be forwardedpublic void operator_lessEqualsThan(org.eclipse.xtext.xbase.lib.Functions.Function0<? extends InputType> msgClosure)
FunctionUnitWithOnlyOneInputPortinput <= [ if (state>0) "some string" else "some other string"
operator_lessEqualsThan in interface FunctionUnitWithOnlyOneInputPort<InputType>msgClosure - the closure to be applied to compute the message to be forwardedpublic void operator_mappedTo(org.eclipse.xtext.xbase.lib.Procedures.Procedure1<? super OutputType> closure)
FunctionUnitWithOnlyOneOutputPort
fu -> [msg|println("message received: " + msg")]
operator_mappedTo in interface FunctionUnitWithOnlyOneOutputPort<OutputType>closure - the message processing closurepublic void operator_mappedTo(InputPort<OutputType> foreignInputPort)
FunctionUnitWithOnlyOneOutputPortfu -> fu'.input
operator_mappedTo in interface FunctionUnitWithOnlyOneOutputPort<OutputType>foreignInputPort - the right side function unit's named input portpublic void operator_mappedTo(FunctionUnitWithOnlyOneInputPort<OutputType> rightSideFunctionUnit)
FunctionUnitWithOnlyOneOutputPortfu -> fu'
operator_mappedTo in interface FunctionUnitWithOnlyOneOutputPort<OutputType>rightSideFunctionUnit - the right side function unit with only one input portpublic void operator_mappedTo(OutputPort<OutputType> rightSideFunctionUnitOutputPort)
FunctionUnitWithOnlyOneOutputPortfu -> .output
operator_mappedTo in interface FunctionUnitWithOnlyOneOutputPort<OutputType>rightSideFunctionUnitOutputPort - the right side function unit's named output port