org.mbari.jddac
Interface IFunction
- All Known Implementing Classes:
- AbstractStatsFunction, AggregateFunction, CoallateByMeasurementNameFunction, FilterByKeyFunction, FilterByMeasurementNameFunction, Log4jFunction, MeanStatsFunction, MutableIntegerArrayStatsFunction, NumberStatsFunction, ParserFunction, RelayFunction
public interface IFunction
Functions can be added to a RelayBlock as follows:
// Create a function
IFunction function = new IFunction() {
public ArgArray execute(ArgArray argArray) {
System.out.println("I'm just passing through");
return argArray
}
}
// Create an ArgArray to hold the function and pass it into process.
// OpIdToExecuteFunction is the OpId that must be passed to process in order
// to trigger the execution of the function. OpIdPassedToChildrenWithResult
// is the OpId that is passed to all children of the relay block, along with
// the output of the function. Essentially all children will have a call made
// as: process(OpIdPassedToChildrenWithResult, argArrayOutputFromFunction)
// REMEMBER: OpId's are Strings!!
ArgArray argArray = new ArgArray();
argArray.put(IFunction.OPID_IN, OpIdToExecuteFunction)
argArray.put(IFunction.OPID_OUT, OpIdPassedToChilderenWithResult)
argArray.put(IFunction.KEY, function)
RelayBlock block = new RelayBlock();
block.process(RelayBlock.OpIdAddFunction, argArray);
- Author:
- brian
- See Also:
FunctionFactory
|
Field Summary |
static java.lang.String |
KEY
|
static java.lang.String |
OPID_IN
|
static java.lang.String |
OPID_OUT
|
|
Method Summary |
net.java.jddac.common.type.ArgArray |
execute(net.java.jddac.common.type.ArgArray argArray)
|
KEY
static final java.lang.String KEY
- See Also:
- Constant Field Values
OPID_IN
static final java.lang.String OPID_IN
- See Also:
- Constant Field Values
OPID_OUT
static final java.lang.String OPID_OUT
- See Also:
- Constant Field Values
execute
net.java.jddac.common.type.ArgArray execute(net.java.jddac.common.type.ArgArray argArray)
Copyright © 2003 MBARI.
The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.