public final class RequestScope extends Object
Modifier and Type | Method and Description |
---|---|
static <T> T |
bind(Object key,
T value)
Binds the given value to the current context for its key.
|
static <T> T |
get(Object key)
Get a previously bind value for the given key or
null . |
static boolean |
hasBind(Object key)
Check to see if there is already a value associated with the current
thread for the given key.
|
static <T> T |
unbind(Object key)
Unbinds the session (if one) current associated with the context for the
given session.
|
public static boolean hasBind(@Nonnull Object key)
key
- The key against which to check for a given value within the current thread.@Nullable public static <T> T bind(@Nonnull Object key, @Nonnull T value)
T
- Bind type.key
- The key to be bound.value
- The value to be bound.@Nullable public static <T> T unbind(@Nonnull Object key)
T
- Bind type.key
- The factory for which to unbind the current session.Copyright © 2020. All rights reserved.