public interface RequestCorrelator extends ContextCapturer
ContextsContainer instance from the server
processing the request to a client sending an outbound request as part of the original request processing. | Modifier and Type | Method and Description |
|---|---|
void |
beforeNewClientRequest(java.lang.String requestId,
ContextsContainer contextsContainer)
A callback before a client request is made.
|
ContextsContainer |
getContextForClientRequest(java.lang.String requestId)
This method does the correlation between the inbound
ContextsContainer to a fresh client request. |
java.lang.String |
getRequestIdForClientRequest()
This does the correlation between an inbound request and all outbound requests that are made during the
processing of the same request.
|
void |
onClientProcessingEnd(java.lang.String requestId)
A callback when a client is done with the processing of the passed
requestId. |
void |
onNewServerRequest(java.lang.String requestId,
ContextsContainer contextsContainer)
A callback for a fresh request on the underlying channel.
|
void |
onServerProcessingEnd(java.lang.String requestId)
A callback when the entire request processing is over for the passed
requestId |
makeClosure, makeClosurejava.lang.String getRequestIdForClientRequest()
null otherwise.ContextsContainer getContextForClientRequest(java.lang.String requestId)
ContextsContainer to a fresh client request.requestId - Request Id for this request. Can be nullContextsContainer for this request, if any. null if none exists.void onNewServerRequest(java.lang.String requestId,
ContextsContainer contextsContainer)
requestId - Request Id for this request.contextsContainer - Container for this request.void beforeNewClientRequest(java.lang.String requestId,
ContextsContainer contextsContainer)
onNewServerRequest(String, ContextsContainer). This method is provided to be explicit on when these
callbacks are made. getRequestIdForClientRequest() and
getContextForClientRequest(String) which is the reason why this context setting is
required.requestId - Request Id for this request.contextsContainer - Container for this request.void onClientProcessingEnd(java.lang.String requestId)
requestId. requestId - Request id for which the processing is over.void onServerProcessingEnd(java.lang.String requestId)
requestIdrequestId - Request id for which the processing is over.