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
-
Method Summary
Modifier and TypeMethodDescriptionApplies a consumer to this builder if it's the specified type.abstract ContextSession
build()
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.
-
-
Method Details
-
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.
Can benull . Value will be ignored.- 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.
-
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.
Can benull .- Returns:
- This object.
-
property
Adds a property to this session.- Parameters:
key
- The property key.value
- The property value.- Returns:
- This object.
-
apply
Applies a consumer to this builder if it's the specified type.- Type Parameters:
T
- The expected type.- Parameters:
type
- The expected type.apply
- The consumer to apply.- Returns:
- This object.
-