public interface ContextCallRegistry
This registry serves for saving call parameters and response. Registry is initialized in root application context and therefore it's accessible from both child (sibling) application contexts.
Basic workflow:
Modifier and Type | Method and Description |
---|---|
void |
addParams(String callId,
ContextCallParams params)
Adds new parameters under specified call ID.
|
void |
addResponse(String callId,
Object res)
Adds new response to specified call ID.
|
void |
clearCall(String callId)
Removes call parameters and response for specified call ID.
|
ContextCallParams |
getParams(String callId)
Gets call parameters.
|
<T> T |
getResponse(String callId,
Class<T> requiredType)
Gets response of the specified call.
|
void addParams(String callId, ContextCallParams params)
callId
- the call identifierparams
- call parametersContextCallParams getParams(String callId)
callId
- the call identifierNoDataFoundException
- if there is no response with specified call IDvoid addResponse(String callId, @Nullable Object res)
callId
- the call identifierres
- response of the call (can be null)@Nullable <T> T getResponse(String callId, Class<T> requiredType)
T
- data typecallId
- the call identifierrequiredType
- the required typeNoDataFoundException
- if there is no response with specified call IDvoid clearCall(String callId)
callId
- the call identifierCopyright © 2018 Pivotal Software, Inc.. All rights reserved.