Package org.apache.juneau.rest
Class RestOpSession
java.lang.Object
org.apache.juneau.ContextSession
org.apache.juneau.rest.RestOpSession
- Direct Known Subclasses:
- RrpcRestOpSession
A session for a single HTTP request.
 
 This session object gets created by RestSession once the Java method to be invoked has been determined.
 
Notes:
- This class is not thread safe.
See Also:
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedRestOpSession(RestOpSession.Builder builder) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionstatic RestOpSession.Buildercreate(RestOpContext ctx, RestSession session) Static creator.finish()Called at the end of a call to finish any remaining tasks such as flushing buffers and logging the response.Returns the bean store for this session.Returns the context that created this session.Returns the REST request object for this session.Returns the REST response object for this session.Returns the context of the parent class of this Java method.Returns the session of the parent class of this Java method.voidrun()Runs this session.status(StatusLine value) Sets the status of the response.Methods inherited from class org.apache.juneau.ContextSessionaddWarning, checkForWarnings, getSessionProperties, getWarnings, isDebug, properties, toString
- 
Constructor Details- 
RestOpSessionConstructor.- Parameters:
- builder- The builder for this object.
 
 
- 
- 
Method Details- 
createStatic creator.- Parameters:
- ctx- The context object of the Java method being invoked.
- session- The REST session object creating this object.
- Returns:
- A new builder.
 
- 
getContextDescription copied from class:ContextSessionReturns the context that created this session.- Overrides:
- getContextin class- ContextSession
- Returns:
- The context that created this session.
 
- 
runRuns this session.Does the following: - Runs the guards on the method.
- Finds the parameter values to pass to the Java method.
- Invokes the Java method.
- Sets the output and status on the response.
- Calls the converters on the Java method.
 - Throws:
- Throwable- Any throwable can be thrown.
 
- 
getRequestReturns the REST request object for this session.- Returns:
- The REST request object for this session.
 
- 
getResponseReturns the REST response object for this session.- Returns:
- The REST response object for this session.
 
- 
getBeanStoreReturns the bean store for this session.- Returns:
- The bean store for this session.
 
- 
getRestContextReturns the context of the parent class of this Java method.- Returns:
- The context of the parent class of this Java method.
 
- 
getRestSessionReturns the session of the parent class of this Java method.- Returns:
- The session of the parent class of this Java method.
 
- 
statusSets the status of the response.- Parameters:
- value- The new status.
- Returns:
- This object.
 
- 
finishCalled at the end of a call to finish any remaining tasks such as flushing buffers and logging the response.- Returns:
- This object.
 
 
-