Class Entry
- java.lang.Object
-
- org.glassfish.contextpropagation.internal.Entry
-
public class Entry extends Object
Entries hold work contexts in the ContextMap as well as related metadata: propagation mode, whether this thread originated the work context, and whether all are allowed to read its work context.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Entry.ContextType
Identifies the type of a work context OPAQUE is a special type that identifies a context that came over the wire that could not be instantiated.
-
Constructor Summary
Constructors Constructor Description Entry(Object context, EnumSet<PropagationMode> propModes, Entry.ContextType contextType)
Dedicated constructor, set the work context, it propagation mode and type.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Entry
createOpaqueEntryInstance(Object context, EnumSet<PropagationMode> propModes, String className)
static Entry
createViewEntryInstance(Object context, EnumSet<PropagationMode> propModes, ViewImpl view)
String
getClassName()
Entry.ContextType
getContextType()
EnumSet<PropagationMode>
getPropagationModes()
<U> U
getValue()
View
getView()
Entry
init(Boolean isOriginator, Boolean allowAllToRead)
Utility method to set additional metadata.String
toString()
-
-
-
Constructor Detail
-
Entry
public Entry(Object context, EnumSet<PropagationMode> propModes, Entry.ContextType contextType)
Dedicated constructor, set the work context, it propagation mode and type.- Parameters:
context
-propModes
-contextType
-
-
-
Method Detail
-
getView
public View getView()
-
createViewEntryInstance
public static Entry createViewEntryInstance(Object context, EnumSet<PropagationMode> propModes, ViewImpl view)
-
getClassName
public String getClassName()
-
createOpaqueEntryInstance
public static Entry createOpaqueEntryInstance(Object context, EnumSet<PropagationMode> propModes, String className)
-
init
public Entry init(Boolean isOriginator, Boolean allowAllToRead)
Utility method to set additional metadata.- Parameters:
isOriginator
-allowAllToRead
-- Returns:
-
getContextType
public Entry.ContextType getContextType()
-
getValue
public <U> U getValue()
-
getPropagationModes
public EnumSet<PropagationMode> getPropagationModes()
-
-