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 classUtils.AccessControlledMapFinderstatic interfaceUtils.ContextMapAdditionalAccessorsstatic interfaceUtils.PrivilegedWireAdapterAccessor
-
Field Summary
Fields Modifier and Type Field Description protected static LongDUMMY_VALUE
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ContextMapgetScopeAwareContextMap()static ContextMapPropagatorgetScopeAwarePropagator()static booleanisAsciiString(String s)static voidregisterContextFactoryForPrefixNamed(String prefixName, ContextViewFactory factory)ViewCapable objects are created by the context propagation framework when needed using the ContextViewFactory registered against the specified context namestatic StringtoString(byte[] bytes)static voidvalidateFactoryRegistrationArgs(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)
-
-