Class MessageContextImpl
java.lang.Object
org.forgerock.services.context.AbstractContext
org.forgerock.caf.authentication.framework.MessageContextImpl
- All Implemented Interfaces:
MessageContext,MessageInfoContext,Context
An implementation of
MessageContext that holds contextual information and state for a
given request and response message exchange.- Since:
- 2.0.0
- See Also:
-
Field Summary
Fields inherited from class org.forgerock.services.context.AbstractContext
data -
Constructor Summary
ConstructorsConstructorDescriptionMessageContextImpl(JsonValue savedContext, ClassLoader classLoader) Creates a new context from the JSON representation of a previously persisted context. -
Method Summary
Modifier and TypeMethodDescriptionGets theAuditTrailinstance for this message exchange.Gets the request object from thisMessageContextInfo.Gets the context map for this message exchange.Gets the response object from thisMessageContextInfo.<T extends AuthenticationState>
TgetState(AsyncServerAuthContext authContext) Gets theAuthenticationStateinstance that maintains any stateful information for the providedAsyncServerAuthContext.voidsetRequest(Request request) Sets the request object for thisMessageContextInfo.voidsetResponse(Response response) Sets the response object for thisMessageContextInfo.Methods inherited from class org.forgerock.services.context.AbstractContext
as, asContext, containsContext, containsContext, get, getContext, getContextName, getId, getParent, getRootId, isRootContext, toJsonValue, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.forgerock.services.context.Context
as, asContext, containsContext, containsContext, get, getContext, getContextName, getId, getParent, getRootId, isRootContext, toJsonValue
-
Constructor Details
-
MessageContextImpl
Creates a new context from the JSON representation of a previously persisted context.- Parameters:
savedContext- The JSON representation from which this context's attributes should be parsed.classLoader- The ClassLoader which can properly resolve the persisted class-name.
-
-
Method Details
-
getRequest
Description copied from interface:MessageInfoContextGets the request object from thisMessageContextInfo.- Specified by:
getRequestin interfaceMessageInfoContext- Returns:
- The
Requestobject.
-
setRequest
Description copied from interface:MessageInfoContextSets the request object for thisMessageContextInfo.- Specified by:
setRequestin interfaceMessageInfoContext- Parameters:
request- TheRequestobject.
-
getResponse
Description copied from interface:MessageInfoContextGets the response object from thisMessageContextInfo.- Specified by:
getResponsein interfaceMessageInfoContext- Returns:
- The
Responseobject.
-
setResponse
Description copied from interface:MessageInfoContextSets the response object for thisMessageContextInfo.- Specified by:
setResponsein interfaceMessageInfoContext- Parameters:
response- TheResponseobject.
-
getRequestContextMap
Description copied from interface:MessageInfoContextGets the context map for this message exchange.
This
Mapcan contain shared information betweenAsyncServerAuthContexts andAsyncServerAuthModules which will be maintained for a single request.- Specified by:
getRequestContextMapin interfaceMessageInfoContext- Returns:
- The request context map.
-
getAuditTrail
Description copied from interface:MessageContextGets theAuditTrailinstance for this message exchange.- Specified by:
getAuditTrailin interfaceMessageContext- Returns:
- The
AuditTrail
-
getState
Description copied from interface:MessageContextGets theAuthenticationStateinstance that maintains any stateful information for the providedAsyncServerAuthContext.- Specified by:
getStatein interfaceMessageContext- Type Parameters:
T- The type of state class.- Parameters:
authContext- TheAsyncServerAuthContextfor which the state applies.- Returns:
- The
AuthenticationStateinstance.
-