Modeling Guide

ResponseInterceptor

The ResponseIntercepter operator can be used to intercept a response message and deliver it to the initiator of a request response invocation. This operator is only needed when the operator which generates a response cannot directly deliver the response message to the operator which initiated the request response invocation.

More concretely, this operator intercepts a request message containing a response callback handle (message.response.callback) which enters from its "in" port, extracts its response callback handle, and forwards this message to its "out" port. Another operator can prepare a response message by setting its message.request.id attribute identical to that of this request message and forward this response message to the "resp" port of this operator, resulting in the response callback to be invoked.

The attributes used in the request response message exchange.
Name Description
message.request.id A unique identifier for a request-response exchange, where this value is used to correlate a response message to its request message.
message.responce.callback A callback handle that is added by the request-response initiator. An operator responsible for returning a response invokes the callback.
message.responce.error It is used to indicate an error if set. It can be of type error or its map representation, which is a map having properties "name" and "message" set to "Error" and the actual error message, respectively.

Configuration Parameters

Parameter

Type

Description

maxWait

int

The maximal wait time in milliseconds.

Default: 10000

Input

Input

Type

Description

in

message

Request message to this operator.

resp

message

Response message to this operator.

Output

Output

Type

Description

out

message

Request message to be sent to a sequence of operators.