Package org.commonjava.indy.util
Class RequestContextHelper
- java.lang.Object
-
- org.commonjava.indy.util.RequestContextHelper
-
public class RequestContextHelper extends Object
The scope annotations (Thread, Header, MDC) tell where the constant is available/used. The static methods are used to manage contextual state in both MDC and ThreadContext.
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description RequestContextHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclearContext(String key)static <T> TgetContext(String key)static <T> TgetContext(String key, T defaultValue)static longgetRawIoWriteNanos()static longgetRequestEndNanos()static voidsetContext(String key, Object value)
-
-
-
Field Detail
-
RAW_IO_WRITE_NANOS
public static final String RAW_IO_WRITE_NANOS
- See Also:
- Constant Field Values
-
RAW_IO_READ_NANOS
public static final String RAW_IO_READ_NANOS
- See Also:
- Constant Field Values
-
END_NANOS
public static final String END_NANOS
- See Also:
- Constant Field Values
-
REST_CLASS_PATH
public static final String REST_CLASS_PATH
- See Also:
- Constant Field Values
-
REST_METHOD_PATH
public static final String REST_METHOD_PATH
- See Also:
- Constant Field Values
-
REST_ENDPOINT_PATH
public static final String REST_ENDPOINT_PATH
- See Also:
- Constant Field Values
-
REST_CLASS
public static final String REST_CLASS
- See Also:
- Constant Field Values
-
CONTENT_TRACKING_ID
public static final String CONTENT_TRACKING_ID
- See Also:
- Constant Field Values
-
ACCESS_CHANNEL
public static final String ACCESS_CHANNEL
- See Also:
- Constant Field Values
-
REQUEST_LATENCY_NS
public static final String REQUEST_LATENCY_NS
- See Also:
- Constant Field Values
-
REQUEST_LATENCY_MILLIS
public static final String REQUEST_LATENCY_MILLIS
- See Also:
- Constant Field Values
-
REQUEST_PHASE
public static final String REQUEST_PHASE
- See Also:
- Constant Field Values
-
PACKAGE_TYPE
public static final String PACKAGE_TYPE
- See Also:
- Constant Field Values
-
METADATA_CONTENT
public static final String METADATA_CONTENT
- See Also:
- Constant Field Values
-
CONTENT_ENTRY_POINT
public static final String CONTENT_ENTRY_POINT
- See Also:
- Constant Field Values
-
HTTP_METHOD
public static final String HTTP_METHOD
- See Also:
- Constant Field Values
-
HTTP_REQUEST_URI
public static final String HTTP_REQUEST_URI
- See Also:
- Constant Field Values
-
PATH
public static final String PATH
- See Also:
- Constant Field Values
-
HTTP_STATUS
public static final String HTTP_STATUS
- See Also:
- Constant Field Values
-
COMPONENT_ID
public static final String COMPONENT_ID
- See Also:
- Constant Field Values
-
X_FORWARDED_FOR
public static final String X_FORWARDED_FOR
- See Also:
- Constant Field Values
-
EXTERNAL_TRACE_ID
public static final String EXTERNAL_TRACE_ID
- See Also:
- Constant Field Values
-
SPAN_ID_HEADER
public static final String SPAN_ID_HEADER
- See Also:
- Constant Field Values
-
REQUEST_PARENT_SPAN
public static final String REQUEST_PARENT_SPAN
- See Also:
- Constant Field Values
-
CLIENT_ADDR
public static final String CLIENT_ADDR
- See Also:
- Constant Field Values
-
INTERNAL_ID
public static final String INTERNAL_ID
- See Also:
- Constant Field Values
-
TRACE_ID
public static final String TRACE_ID
- See Also:
- Constant Field Values
-
FORCE_METERED
public static final String FORCE_METERED
- See Also:
- Constant Field Values
-
IS_METERED
public static final String IS_METERED
- See Also:
- Constant Field Values
-
CUMULATIVE_TIMINGS
public static final String CUMULATIVE_TIMINGS
- See Also:
- Constant Field Values
-
CUMULATIVE_COUNTS
public static final String CUMULATIVE_COUNTS
- See Also:
- Constant Field Values
-
IS_RAW_VIEW
public static final String IS_RAW_VIEW
- See Also:
- Constant Field Values
-
REQUEST_PHASE_START
public static final String REQUEST_PHASE_START
- See Also:
- Constant Field Values
-
REQUEST_PHASE_END
public static final String REQUEST_PHASE_END
- See Also:
- Constant Field Values
-
-
Method Detail
-
getContext
public static <T> T getContext(String key)
-
getContext
public static <T> T getContext(String key, T defaultValue)
-
clearContext
public static void clearContext(String key)
-
getRequestEndNanos
public static long getRequestEndNanos()
-
getRawIoWriteNanos
public static long getRawIoWriteNanos()
-
-