public abstract class AbstractCorrelator extends Object implements Correlator
Constructor and Description |
---|
AbstractCorrelator() |
Modifier and Type | Method and Description |
---|---|
abstract String |
getRequestCorrelationId(Message message,
Properties messageAttributes)
Extracts the correlation id from the request.
|
abstract List<String> |
getResponseCorrelationIds(Serializable response,
io.vertx.core.MultiMap headers)
Extracts the correlation ids from the response.
|
void |
registerRequest(SenderTask senderTask,
Message message,
Properties messageAttributes)
Registers a request to be sent.
|
void |
registerResponse(Serializable response,
io.vertx.core.MultiMap headers)
Extracts the correlation id from the response and calls the corresponding sender task's
SenderTask.registerResponse(Serializable) method. |
public void registerRequest(SenderTask senderTask, Message message, Properties messageAttributes)
Correlator
registerRequest
in interface Correlator
senderTask
- SenderTask
controlling the sending of the message.message
- The message to be sent and from which the correlation id is extracted.messageAttributes
- Message attributes of the message to be sent. Can help with correlation id extraction.public abstract String getRequestCorrelationId(Message message, Properties messageAttributes)
message
- The request message.messageAttributes
- The request message attributes.public void registerResponse(Serializable response, io.vertx.core.MultiMap headers)
Correlator
SenderTask.registerResponse(Serializable)
method.
Called from a receiver upon receiving a response.registerResponse
in interface Correlator
response
- The response received by Receiver
.headers
- Headers received with the response. Can be useful for discovering correlation id.public abstract List<String> getResponseCorrelationIds(Serializable response, io.vertx.core.MultiMap headers)
response
- The received response.headers
- Headers received with the response. Can be useful for discovering correlation id.Copyright © 2010–2017 PerfCake Community. All rights reserved.