Package org.apache.juneau
Class ContextSession.Builder
java.lang.Object
org.apache.juneau.ContextSession.Builder
- Direct Known Subclasses:
BeanSession.Builder,RestOpSession.Builder,RestSession.Builder
- Enclosing class:
- ContextSession
Builder class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionApplies a consumer to this builder if it's the specified type.abstract ContextSessionbuild()Build the object.Debug mode.properties(Map<String, Object> value) Session properties.Adds a property to this session.Create an unmodifiable session.
-
Constructor Details
-
Builder
Constructor.- Parameters:
ctx- The context creating this session.
Cannot benull .
-
-
Method Details
-
apply
Applies a consumer to this builder if it's the specified type.- Type Parameters:
T- The expected type.- Parameters:
type- The expected type.
Cannot benull .apply- The consumer to apply.
Cannot benull .- Returns:
- This object.
-
build
Build the object.- Returns:
- The built object.
-
debug
Debug mode.Enables the following additional information during parsing:
- When bean setters throws exceptions, the exception includes the object stack information in order to determine how that method was invoked.
If not specified, defaults to
Context.Builder.debug().See Also:
- Parameters:
value- The new value for this property.
Ifnull , defaults toContext.isDebug().- Returns:
- This object.
-
properties
Session properties.Session properties are generic key-value pairs that can be passed through the session and made available to any customized serializers/parsers or swaps.
- Parameters:
value- The new value for this property.
Cannot benull .- Returns:
- This object.
-
property
Adds a property to this session.- Parameters:
key- The property key.
Cannot benull .value- The property value.
Can benull (removes the property).- Returns:
- This object.
-
unmodifiable
Create an unmodifiable session.The created ContextSession object will be unmodifiable which makes it suitable for caching and reuse.
- Returns:
- This object.
-