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.StringnameForRequest(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 ofDynamicSegmentNamingStrategywith the providedfallbackNameand arecognizedHostsvalue 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_NAMEenvironment variable orcom.amazonaws.xray.strategy.tracingNamesystem 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 ofDynamicSegmentNamingStrategywith the providedfallbackNameandrecognizedHostsvalues.- 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_NAMEenvironment variable orcom.amazonaws.xray.strategy.tracingNamesystem 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 theHostheader from theHttpServletRequest. If theHostheader has a value and if the value matches the optionally providedrecognizedHostspattern, then this value is returned as the segment name. Otherwise,fallbackNameis returned.- Specified by:
nameForRequestin interfaceSegmentNamingStrategy- Parameters:
request- the incoming request- Returns:
- the segment name for the incoming request.
-
-