Package com.amazonaws.xray.strategy
Class DynamicSegmentNamingStrategy
- java.lang.Object
-
- com.amazonaws.xray.strategy.DynamicSegmentNamingStrategy
-
- All Implemented Interfaces:
SegmentNamingStrategy
@Deprecated public class DynamicSegmentNamingStrategy extends java.lang.Object implements SegmentNamingStrategy
Deprecated.
-
-
Field Summary
-
Fields inherited from interface com.amazonaws.xray.strategy.SegmentNamingStrategy
NAME_OVERRIDE_ENVIRONMENT_VARIABLE_KEY, NAME_OVERRIDE_SYSTEM_PROPERTY_KEY
-
-
Constructor Summary
Constructors Constructor Description DynamicSegmentNamingStrategy(java.lang.String fallbackName)
Deprecated.DynamicSegmentNamingStrategy(java.lang.String fallbackName, java.lang.String recognizedHosts)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
nameForRequest(javax.servlet.http.HttpServletRequest request)
Deprecated.Returns the derived segment name for an incoming request.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.amazonaws.xray.strategy.SegmentNamingStrategy
getOverrideName
-
-
-
-
Constructor Detail
-
DynamicSegmentNamingStrategy
@Deprecated public DynamicSegmentNamingStrategy(java.lang.String fallbackName)
Deprecated.Creates an instance ofDynamicSegmentNamingStrategy
with the providedfallbackName
and arecognizedHosts
value of "*".- Parameters:
fallbackName
- the fallback segment name used when no host header is included in the incoming request. This will be overriden by the value of theAWS_XRAY_TRACING_NAME
environment variable orcom.amazonaws.xray.strategy.tracingName
system property, if either are set to a non-empty value.
-
DynamicSegmentNamingStrategy
@Deprecated public DynamicSegmentNamingStrategy(java.lang.String fallbackName, java.lang.String recognizedHosts)
Deprecated.Creates an instance ofDynamicSegmentNamingStrategy
with the providedfallbackName
andrecognizedHosts
values.- Parameters:
fallbackName
- the fallback segment name used when no host header is included in the incoming request or the incoming host header value does not match the provided pattern. This will be overriden by the value of theAWS_XRAY_TRACING_NAME
environment variable orcom.amazonaws.xray.strategy.tracingName
system property, if either are set to a non-empty value.recognizedHosts
- the pattern to match the incoming host header value against. This pattern is compared against the incoming host header using theSearchPattern.wildcardMatch(String, String)
method.
-
-
Method Detail
-
nameForRequest
public java.lang.String nameForRequest(javax.servlet.http.HttpServletRequest request)
Deprecated.Returns the derived segment name for an incoming request. Attempts to get theHost
header from theHttpServletRequest
. If theHost
header has a value and if the value matches the optionally providedrecognizedHosts
pattern, then this value is returned as the segment name. Otherwise,fallbackName
is returned.- Specified by:
nameForRequest
in interfaceSegmentNamingStrategy
- Parameters:
request
- the incoming request- Returns:
- the segment name for the incoming request.
-
-