org.syrup
Interface Function

All Known Implementing Classes:
Abort, Alarm, BShell, Concat, Constant, Duplicate, Finish, Flip, Initiate, Launch, Null, Shell, Split

public interface Function

The function of a Task that is executed by a Worker. A concrete implementation must be a stateless (pure) Function; the Result after execution must solely depend on the Context.

Author:
Robbert van Dalen

Field Summary
static java.lang.String COPYRIGHT
           
 
Method Summary
 Result execute(Context context)
          Generates a Result given a Task's Context.
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Method Detail

execute

public Result execute(Context context)
Generates a Result given a Task's Context. Implementations should not throw Exceptions, retain Objects or any other resources after the calling Thread exits this method.

Parameters:
context - The Context from which the Function get its parameters.
Returns:
The Result after execution.