Package org.glassfish.contextpropagation
Interface View
-
- All Known Implementing Classes:
ViewImpl
public interface View
A View provides access to a subset of contexts that share a common prefix that is the key for a ViewCapable instance. View is used by Implementors of ViewCapable.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> T
get(String name)
<T> T
put(String name, Boolean context, EnumSet<PropagationMode> propagationModes)
Stores the specified context under the specified name into the in-scope ContextMap.<T> T
put(String name, Character context, EnumSet<PropagationMode> propagationModes)
Stores the specified context under the specified name into the in-scope ContextMap.<T> T
put(String name, String context, EnumSet<PropagationMode> propagationModes)
Stores the specified context under the specified name into the in-scope ContextMap.<T,U extends Number>
Tput(String name, U context, EnumSet<PropagationMode> propagationModes)
Stores the specified context under the specified name into the in-scope ContextMap.<T> T
remove(String name)
Removes the specified context under the specified name from the in-scope ContextMap.
-
-
-
Method Detail
-
get
<T> T get(String name)
- Parameters:
name
- The name of the context sought.- Returns:
- The context associated to the specified name.
- Throws:
InsufficientCredentialException
- If the user has insufficient privileges to access that context.
-
put
<T> T put(String name, String context, EnumSet<PropagationMode> propagationModes)
Stores the specified context under the specified name into the in-scope ContextMap.- Parameters:
name
- The name to associate to the specified contextcontext
- a String context.propagationModes
- A set of propagation modes that control over which protocol this context will be propagated.- Returns:
- The context being replaced.
- Throws:
InsufficientCredentialException
- If the user has insufficient privileges to access that context.
-
put
<T,U extends Number> T put(String name, U context, EnumSet<PropagationMode> propagationModes)
Stores the specified context under the specified name into the in-scope ContextMap.- Parameters:
name
- The name to associate to the specified contextcontext
- a Number context.propagationModes
- A set of propagation modes that control over which protocol this context will be propagated.- Returns:
- The context being replaced.
- Throws:
InsufficientCredentialException
- If the user has insufficient privileges to access that context.
-
put
<T> T put(String name, Boolean context, EnumSet<PropagationMode> propagationModes)
Stores the specified context under the specified name into the in-scope ContextMap.- Parameters:
name
- The name to associate to the specified contextcontext
- an boolean String context.propagationModes
- A set of propagation modes that control over which protocol this context will be propagated.- Returns:
- The context being replaced.
- Throws:
InsufficientCredentialException
- If the user has insufficient privileges to access that context.
-
put
<T> T put(String name, Character context, EnumSet<PropagationMode> propagationModes)
Stores the specified context under the specified name into the in-scope ContextMap.- Parameters:
name
- The name to associate to the specified contextcontext
- an char String context.propagationModes
- A set of propagation modes that control over which protocol this context will be propagated.- Returns:
- The context being replaced.
- Throws:
InsufficientCredentialException
- If the user has insufficient privileges to access that context.
-
remove
<T> T remove(String name)
Removes the specified context under the specified name from the in-scope ContextMap.- Parameters:
name
- The name to associate to the specified context- Returns:
- The context being replaced.
- Throws:
InsufficientCredentialException
- If the user has insufficient privileges to access that context.
-
-