@Singleton @Requires(classes=HttpServerConfiguration.class) public class OptionalSessionValueArgumentBinder extends java.lang.Object implements TypedRequestArgumentBinder<java.util.Optional>, AnnotatedRequestArgumentBinder<SessionValue,java.util.Optional>
ArgumentBinder.BindingResult<T>
Constructor and Description |
---|
OptionalSessionValueArgumentBinder() |
Modifier and Type | Method and Description |
---|---|
Argument<java.util.Optional> |
argumentType() |
ArgumentBinder.BindingResult<java.util.Optional> |
bind(ArgumentConversionContext<java.util.Optional> context,
HttpRequest<?> source)
Bind the given argument from the given source.
|
java.lang.Class<SessionValue> |
getAnnotationType() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
superTypes, supportsSuperTypes
of
public Argument<java.util.Optional> argumentType()
argumentType
in interface TypeArgumentBinder<java.util.Optional,HttpRequest<?>>
public java.lang.Class<SessionValue> getAnnotationType()
getAnnotationType
in interface AnnotatedArgumentBinder<SessionValue,java.util.Optional,HttpRequest<?>>
public ArgumentBinder.BindingResult<java.util.Optional> bind(ArgumentConversionContext<java.util.Optional> context, HttpRequest<?> source)
ArgumentBinder
bind
in interface ArgumentBinder<java.util.Optional,HttpRequest<?>>
context
- The ArgumentConversionContext
source
- The sourceOptional
of the value. If no binding was possible Optional.empty()