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.
See Also:
-
Nested Class Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
ContextSession
(ContextSession.Builder builder) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addWarning
(String msg, Object... args) Logs a warning message.void
Throws aBeanRuntimeException
if any warnings occurred in this session and debug is enabled.Returns the context that created this session.final JsonMap
Returns the session properties on this session.Returns the warnings that occurred in this session.boolean
isDebug()
Debug mode enabled.protected JsonMap
Returns the properties on this bean as a map for debugging.toString()
-
Constructor Details
-
ContextSession
Default constructor.- Parameters:
builder
- The builder for this object
-
-
Method Details
-
getSessionProperties
Returns the session properties on this session.- Returns:
- The session properties on this session. Never
null .
-
getContext
Returns the context that created this session.- Returns:
- The context that created this session.
-
addWarning
Logs a warning message.- Parameters:
msg
- The warning message.args
- OptionalMessageFormat
-style arguments.
-
getWarnings
Returns the warnings that occurred in this session.- Returns:
- The warnings that occurred in this session, or
null if no warnings occurred.
-
checkForWarnings
Throws aBeanRuntimeException
if any warnings occurred in this session and debug is enabled. -
isDebug
Debug mode enabled.- Returns:
true if debug mode is enabled.- See Also:
-
properties
Returns the properties on this bean as a map for debugging.- Returns:
- The properties on this bean as a map for debugging.
-
toString
-