class: integration_core_module
[7:14] static extends: object
Module JAR loader class.
Methods
- integration_core_module ()
class: ScatterGather
[257:14] (extern: com.lehman.aussom.ScatterGather) extends: object
ScatterGather sends the same payload to several recipient callbacks across a bounded thread pool and blocks until every recipient has finished. Each recipient's return value becomes its result, gathered in recipient order.
Methods
-
ScatterGather (
Payload, list Recipients)Creates a new ScatterGather.
- @p
Payloadis the value handed to every recipient. - @p
Recipientsis a list of callbacks, each invoked once with the payload.
- @p
-
init (
Payload, list Recipients) -
setNumThreads (
int NumThreads)Sets the maximum number of worker threads. Default: the number of available processors.
- @p
NumThreadsis an int with the pool size. - @r
thisobject
- @p
-
setThreadTimeout (
int ThreadTimeoutMills)Sets the per-worker timeout in milliseconds. 0 means no timeout. Default: 0.
- @p
ThreadTimeoutMillsis an int with the timeout in milliseconds. - @r
thisobject
- @p
-
setReturnValues (
bool ReturnValues = true)Sets whether the run collects and returns the recipient return values. Default: true.
- @p
ReturnValuesis a bool with the flag. - @r
thisobject
- @p
-
run ()
Sends the payload to every recipient in parallel and blocks until done.
- @r
Alist of return values aligned to recipient order, with null for any recipient that failed or timed out, or null when return values are disabled.
- @r
class: IMessage
[25:7] extends: object
IMessage is the standard message type passed between the EIP tools. It holds message metadata, the content type, the body, and a correlation id. It is a plain Aussom value type so it works in both the Aussom CLI and Aussom Server.
Members
-
attributes
Aussom map of message metadata (headers, query params, and so on).
-
type
Content type string describing the body (for example application/json).
-
body
The message body: a Buffer for binary, a string for text/JSON/XML, or an Aussom object.
-
correlationId
Correlation id string tying related messages together.
Methods
-
IMessage ()
Constructs a new IMessage with an empty attribute map and a freshly generated correlation id.
-
getAttributes ()
Gets the attribute map.
- @r
Theattribute map.
- @r
-
setAttributes (
map Attributes)Sets the attribute map.
- @p
Attributesis the map of message metadata. - @r
thisobject
- @p
-
getType ()
Gets the content type.
- @r
Astring with the content type.
- @r
-
setType (
string Type)Sets the content type.
- @p
Typeis a string with the content type. - @r
thisobject
- @p
-
getBody ()
Gets the message body.
- @r
Themessage body.
- @r
-
setBody (
Body)Sets the message body.
- @p
Bodyis the message body. - @r
thisobject
- @p
-
getCorrelationId ()
Gets the correlation id.
- @r
Astring with the correlation id.
- @r
-
setCorrelationId (
string CorrelationId)Sets the correlation id.
- @p
CorrelationIdis a string with the correlation id. - @r
thisobject
- @p
-
copy ()
Returns a deep copy of this message. The attribute map, the body, and any nested maps and lists are copied so the copy is independent of the original. Strings and numbers are immutable and shared safely. Other object values (such as a Buffer) are copied by reference. The copy keeps the same correlation id.
- @r
Anew IMessage that is a deep copy of this one.
- @r
-
deepCopy (
Val)Recursively deep copies maps and lists. Other values are returned as-is.
- @p
Valis the value to copy. - @r
Adeep copy of the value.
- @p
class: ParallelForeach
[209:14] (extern: com.lehman.aussom.ParallelForeach) extends: object
ParallelForeach runs a callback over each value in a list across a bounded thread pool and blocks until every value has been processed. The callback's return value becomes that value's result.
Methods
-
ParallelForeach (
list Values, callback OnExecute)Creates a new ParallelForeach.
- @p
Valuesis a list of values to process. - @p
OnExecuteis the callback invoked once per value, receiving the value.
- @p
-
init (
list Values, callback OnExecute) -
setNumThreads (
int NumThreads)Sets the maximum number of worker threads. Default: the number of available processors.
- @p
NumThreadsis an int with the pool size. - @r
thisobject
- @p
-
setThreadTimeout (
int ThreadTimeoutMills)Sets the per-worker timeout in milliseconds. 0 means no timeout. Default: 0.
- @p
ThreadTimeoutMillsis an int with the timeout in milliseconds. - @r
thisobject
- @p
-
setReturnValues (
bool ReturnValues = true)Sets whether the run collects and returns the callback return values. Default: true.
- @p
ReturnValuesis a bool with the flag. - @r
thisobject
- @p
-
run ()
Runs the callback over every value in parallel and blocks until done.
- @r
Alist of return values aligned to input order, with null for any value that failed or timed out, or null when return values are disabled.
- @r
class: Pipeline
[306:7] extends: object
Pipeline runs a value through an ordered list of step callbacks, each step's output feeding the next. A step returns the next value to continue, or null to drop the value and stop the chain. It is the sequential sibling of ParallelForeach and is pure Aussom, since it is a simple loop over the steps.
Members
-
steps
Ordered list of step callbacks.
-
onStep
Optional per-step observability hook.
-
onError
Optional error handler.
Methods
-
Pipeline (
list Steps)Constructs a Pipeline with the ordered step callbacks.
- @p
Stepsis a list of step callbacks (may be empty).
- @p
-
add (
callback Step)Appends a step to the chain.
- @p
Stepis the step callback to append. - @r
thisobject
- @p
-
setOnStep (
callback OnStep)Sets the per-step observability hook. The hook is invoked after each step as OnStep.call(StepIndex, Message) with the value that step produced.
- @p
OnStepis the hook callback. - @r
thisobject
- @p
-
setOnError (
callback OnError)Sets the error handler. When set, a step that throws is caught and the handler is invoked as OnError.call(StepIndex, Message, Error), where Message is the input to the failing step. When not set, a thrown error propagates out of run.
- @p
OnErroris the error handler callback. - @r
thisobject
- @p
-
run (
Message)Runs the value through every step in order and returns the final result. A step returning null stops the chain and run returns null. With an error handler set, a thrown error is routed to it and run returns null; otherwise the error propagates.
- @p
Messageis the value to run through the steps. - @r
Thefinal value, or null if a step dropped it or a handled error stopped it.
- @p
class: IntegrationCore
[16:14] (extern: com.lehman.aussom.IntegrationCore) extends: object
This extern class is a link to the .java file.
Methods
- aussomFunction (
string Variable)
class: iutils
[137:14] static extends: object
iutils provides static helper functions for the EIP tools.
Methods
-
newCorrelationId ()
Generates a new correlation id string.
- @r
Astring with a newly generated unique id.
- @r
-
message (
Req)Converts an Aussom Server HttpReq object into an IMessage. The request headers, method, path, and query parameters are copied into the message attributes. The correlation id is taken from the X-Correlation-ID header when present or generated otherwise. Header lookups ignore case. The body and type depend on the Content-Type header: - For form requests (multipart/form-data or application/x-www-form-urlencoded), the parsed form data is used as the body. This is a native Aussom map of the fields, with any uploaded files as Buffer values, so the type is set to application/aussom. The original Content-Type stays available in the attribute headers. - Otherwise the body is read as a string and the type is the Content-Type header, defaulting to text/plain when absent. Only the HttpReq accessor methods are used, so the resulting IMessage holds native Aussom values only and stays usable outside the server.
- @p
Reqis an Aussom Server HttpReq object. - @r
Anew IMessage built from the request.
- @p