Package org.apache.juneau.marshall
Class ContextSession
java.lang.Object
org.apache.juneau.marshall.ContextSession
- Direct Known Subclasses:
MarshallingSession,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 ClassesModifier and TypeClassDescriptionstatic classContextSession.Builder<SELF extends ContextSession.Builder<SELF>>Builder class. -
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- OptionalString.format-style arguments.
Cannot benull (individual values may benull ).
-
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 an empty list 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.
-