Package org.apache.juneau
Class ContextSession
java.lang.Object
org.apache.juneau.ContextSession
- Direct Known Subclasses:
BeanSession,RestOpSession,RestSession
A one-time-use non-thread-safe object that's meant to be used once and then thrown away.
Notes:
- This class is not typically thread safe.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedContextSession(ContextSession.Builder builder) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddWarning(String msg, Object... args) Logs a warning message.voidThrows aBeanRuntimeExceptionif any warnings occurred in this session and debug is enabled.Returns the context that created this session.Returns the session properties on this session.Returns the warnings that occurred in this session.booleanisDebug()Debug mode enabled.Returns the properties on this bean as a map for debugging.toString()
-
Constructor Details
-
ContextSession
Default constructor.- Parameters:
builder- The builder for this object.
Cannot benull .
-
-
Method Details
-
addWarning
Logs a warning message.- Parameters:
msg- The warning message.
Cannot benull .args- OptionalMessageFormat-style arguments.
Cannot containnull values.
-
checkForWarnings
Throws aBeanRuntimeExceptionif any warnings occurred in this session and debug is enabled. -
getContext
Returns the context that created this session.- Returns:
- The context that created this session.
-
getSessionProperties
Returns the session properties on this session.- Returns:
- The session properties on this session. Never
null .
-
getWarnings
Returns the warnings that occurred in this session.- Returns:
- The warnings that occurred in this session, or
null if no warnings occurred.
-
isDebug
Debug mode enabled.- Returns:
true if debug mode is enabled.- See Also:
-
toString
-
properties
Returns the properties on this bean as a map for debugging.- Returns:
- The properties on this bean as a map for debugging.
-