Package net.shibboleth.sp.messaging
Class RemotedHttpServletRequestResponseContext
java.lang.Object
net.shibboleth.sp.messaging.RemotedHttpServletRequestResponseContext
Class which holds and makes available the indirected HTTP servlet request and response via ThreadLocal storage.
Unlike the IdP-which uses a filter to stash the actual container-supplied interfaces, these objects are backed by the DDF objects in an SP agent request/response. It also allows them to be individually null.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ThreadLocal<RemotedHttpServletRequest>ThreadLocal storage for request.private static final ThreadLocal<RemotedHttpServletResponse>ThreadLocal storage for response. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidClear the current thread-local context instances.static RemotedHttpServletRequestGet the currentRemotedHttpServletRequestbeing serviced by the current thread.static RemotedHttpServletResponseGet the currentRemotedHttpServletResponsebeing serviced by the current thread.static voidloadCurrent(RemotedHttpServletRequest request, RemotedHttpServletResponse response) Load the thread-local storage with the current request and response.
-
Field Details
-
currentRequest
ThreadLocal storage for request. -
currentResponse
ThreadLocal storage for response.
-
-
Constructor Details
-
RemotedHttpServletRequestResponseContext
private RemotedHttpServletRequestResponseContext()Constructor.
-
-
Method Details
-
loadCurrent
public static void loadCurrent(@Nullable RemotedHttpServletRequest request, @Nullable RemotedHttpServletResponse response) Load the thread-local storage with the current request and response.- Parameters:
request- the currentRemotedHttpServletResponseresponse- the currentRemotedHttpServletResponse
-
clearCurrent
public static void clearCurrent()Clear the current thread-local context instances. -
getRequest
Get the currentRemotedHttpServletRequestbeing serviced by the current thread.- Returns:
- the current request
-
getResponse
Get the currentRemotedHttpServletResponsebeing serviced by the current thread.- Returns:
- the current response
-