Package org.glassfish.contextpropagation
Enum PropagationMode
- java.lang.Object
-
- java.lang.Enum<PropagationMode>
-
- org.glassfish.contextpropagation.PropagationMode
-
- All Implemented Interfaces:
Serializable
,Comparable<PropagationMode>
public enum PropagationMode extends Enum<PropagationMode>
The propagation mode determines if a work context is propagated. The creator of a work context declares a set of propagation modes that is allowed by the context. When protocols send or receive messages, they will propagate any work context that includes the protocol's specific propagation mode. - LOCAL Context lives only in the current thread - THREAD Context will be propagated from thread to thread - RMI propagation along RMI messages - JMS_QUEUE propagation to JMS queues - JMS_TOPIC propagation to JMS topics - SOAP propagation along a SOAP message - MIME_HEADER propagation from a mime header or http cookie - ONEWAY propagation in requests only, not in responses.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description JMS_QUEUE
JMS_TOPIC
LOCAL
MIME_HEADER
ONEWAY
RMI
SOAP
THREAD
TRANSACTION
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EnumSet<PropagationMode>
defaultSet()
static EnumSet<PropagationMode>
defaultSetOneway()
static PropagationMode
fromOrdinal(int ordinal)
A utility method for getting a PropagationMode given that we know its ordinal value.static PropagationMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static PropagationMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LOCAL
public static final PropagationMode LOCAL
-
THREAD
public static final PropagationMode THREAD
-
RMI
public static final PropagationMode RMI
-
TRANSACTION
public static final PropagationMode TRANSACTION
-
JMS_QUEUE
public static final PropagationMode JMS_QUEUE
-
JMS_TOPIC
public static final PropagationMode JMS_TOPIC
-
SOAP
public static final PropagationMode SOAP
-
MIME_HEADER
public static final PropagationMode MIME_HEADER
-
ONEWAY
public static final PropagationMode ONEWAY
-
-
Method Detail
-
values
public static PropagationMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PropagationMode c : PropagationMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PropagationMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
fromOrdinal
public static PropagationMode fromOrdinal(int ordinal)
A utility method for getting a PropagationMode given that we know its ordinal value. Developers are not expected to use this function. It is mostly used by WireAdapters.- Parameters:
ordinal
-- Returns:
- The propagation mode that has the specified ordinal value.
-
defaultSet
public static EnumSet<PropagationMode> defaultSet()
- Returns:
- The default set of propagation modes: THREAD, RMI, JMS_QUEUE, SOAP and MIME_HEADER
-
defaultSetOneway
public static EnumSet<PropagationMode> defaultSetOneway()
-
-