Class Utils
- java.lang.Object
-
- org.glassfish.contextpropagation.internal.Utils
-
public class Utils extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
Utils.AccessControlledMapFinder
static interface
Utils.ContextMapAdditionalAccessors
static interface
Utils.PrivilegedWireAdapterAccessor
-
Field Summary
Fields Modifier and Type Field Description protected static Long
DUMMY_VALUE
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ContextMap
getScopeAwareContextMap()
static ContextMapPropagator
getScopeAwarePropagator()
static boolean
isAsciiString(String s)
static void
registerContextFactoryForPrefixNamed(String prefixName, ContextViewFactory factory)
ViewCapable objects are created by the context propagation framework when needed using the ContextViewFactory registered against the specified context namestatic String
toString(byte[] bytes)
static void
validateFactoryRegistrationArgs(String key, LoggerAdapter.MessageID messageID, String contextClassName, Object factory, Map<String,?> factoriesByKey)
-
-
-
Field Detail
-
DUMMY_VALUE
protected static final Long DUMMY_VALUE
-
-
Method Detail
-
getScopeAwarePropagator
public static ContextMapPropagator getScopeAwarePropagator()
- Returns:
- The in-scope instance of ContextMapPropagator so that communication protocols can ask the ContextMapPropagator to handle the context propagation bytes on the wire.
-
getScopeAwareContextMap
public static ContextMap getScopeAwareContextMap()
-
registerContextFactoryForPrefixNamed
public static void registerContextFactoryForPrefixNamed(String prefixName, ContextViewFactory factory)
ViewCapable objects are created by the context propagation framework when needed using the ContextViewFactory registered against the specified context name- Parameters:
prefixName
- This is the name of the context that should be instantiated with the corresponding factory.factory
- A ContextViewFactory.
-
validateFactoryRegistrationArgs
public static void validateFactoryRegistrationArgs(String key, LoggerAdapter.MessageID messageID, String contextClassName, Object factory, Map<String,?> factoriesByKey)
-
isAsciiString
public static boolean isAsciiString(String s)
-
toString
public static String toString(byte[] bytes)
-
-