Interface NodeBody<I,O>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The body of a
FunctionNode, which takes the node run's context and its single input; the
input may be shared with other nodes, so the body must not mutate it. It runs on the node's
scheduler (FunctionNode.Builder.scheduler), by default the Runner's, so it may
block, and a small fixed-size scheduler can deadlock bodies that wait for one another. Canceling
the node interrupts the body's thread and drops its result, and the node's attempt ends only once
the body returns, so a body that ignores the interrupt holds up the retry and the caller.
Disposing the whole run does not wait for it.-
Method Summary
-
Method Details
-
apply
Returnsnullfor no output, anEventto send with any output in JSON form, or the output, which is sent in its JSON form; a returnedContentis the output, not a message.inputis null when the predecessor sent no output or the port isVoid; a primitive port fails withNodeInputValidationExceptioninstead. To ask the user for input, callFunctionNodes.requestInput(String, String, Object, Schema).- Throws:
Exception
-