public final class MessageContextImpl extends AbstractContext implements MessageContext
MessageContext
that holds contextual information and state for a
given request and response message exchange.MessageContext
,
MessageInfoContext
data
Constructor and Description |
---|
MessageContextImpl(JsonValue savedContext,
ClassLoader classLoader)
Creates a new context from the JSON representation of a previously
persisted context.
|
Modifier and Type | Method and Description |
---|---|
AuditTrail |
getAuditTrail()
Gets the
AuditTrail instance for this message exchange. |
Request |
getRequest()
Gets the request object from this
MessageContextInfo . |
Map<String,Object> |
getRequestContextMap()
Gets the context map for this message exchange.
|
Response |
getResponse()
Gets the response object from this
MessageContextInfo . |
<T extends AuthenticationState> |
getState(AsyncServerAuthContext authContext)
Gets the
AuthenticationState instance that maintains any stateful information for
the provided AsyncServerAuthContext . |
void |
setRequest(Request request)
Sets the request object for this
MessageContextInfo . |
void |
setResponse(Response response)
Sets the response object for this
MessageContextInfo . |
asContext, containsContext, containsContext, getContext, getContextName, getId, getParent, getRootId, isRootContext, toJsonValue, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
asContext, containsContext, containsContext, getContext, getContextName, getId, getParent, getRootId, isRootContext, toJsonValue
public MessageContextImpl(JsonValue savedContext, ClassLoader classLoader)
savedContext
- The JSON representation from which this context's attributes
should be parsed.classLoader
- The ClassLoader which can properly resolve the persisted class-name.public Request getRequest()
MessageInfoContext
MessageContextInfo
.getRequest
in interface MessageInfoContext
Request
object.public void setRequest(Request request)
MessageInfoContext
MessageContextInfo
.setRequest
in interface MessageInfoContext
request
- The Request
object.public Response getResponse()
MessageInfoContext
MessageContextInfo
.getResponse
in interface MessageInfoContext
Response
object.public void setResponse(Response response)
MessageInfoContext
MessageContextInfo
.setResponse
in interface MessageInfoContext
response
- The Response
object.public Map<String,Object> getRequestContextMap()
MessageInfoContext
Gets the context map for this message exchange.
This Map
can contain shared information between
AsyncServerAuthContext
s and
AsyncServerAuthModule
s which will be maintained
for a single request.
getRequestContextMap
in interface MessageInfoContext
public AuditTrail getAuditTrail()
MessageContext
AuditTrail
instance for this message exchange.getAuditTrail
in interface MessageContext
AuditTrail
public <T extends AuthenticationState> T getState(AsyncServerAuthContext authContext)
MessageContext
AuthenticationState
instance that maintains any stateful information for
the provided AsyncServerAuthContext
.getState
in interface MessageContext
T
- The type of state class.authContext
- The AsyncServerAuthContext
for which the state applies.AuthenticationState
instance.Copyright © 2010-2018, ForgeRock All Rights Reserved.