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