@Service public class ContextCallRegistryMemoryImpl extends Object implements ContextCallRegistry
ContextCallRegistry
interface.Constructor and Description |
---|
ContextCallRegistryMemoryImpl() |
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.
|
public void addParams(String callId, ContextCallParams params)
ContextCallRegistry
addParams
in interface ContextCallRegistry
callId
- the call identifierparams
- call parameterspublic ContextCallParams getParams(String callId)
ContextCallRegistry
getParams
in interface ContextCallRegistry
callId
- the call identifierpublic void addResponse(String callId, Object res)
ContextCallRegistry
addResponse
in interface ContextCallRegistry
callId
- the call identifierres
- response of the call (can be null)@Nullable public <T> T getResponse(String callId, Class<T> requiredType)
ContextCallRegistry
getResponse
in interface ContextCallRegistry
T
- data typecallId
- the call identifierrequiredType
- the required typepublic void clearCall(String callId)
ContextCallRegistry
clearCall
in interface ContextCallRegistry
callId
- the call identifierCopyright © 2018 Pivotal Software, Inc.. All rights reserved.