Class AbstractSegmentDecorator
java.lang.Object
org.apache.camel.component.aws.xray.decorators.AbstractSegmentDecorator
- All Implemented Interfaces:
SegmentDecorator
- Direct Known Subclasses:
AbstractHttpSegmentDecorator,AbstractInternalSegmentDecorator,AbstractMessagingSegmentDecorator,CqlSegmentDecorator,ElasticsearchSegmentDecorator,JdbcSegmentDecorator,LogSegmentDecorator,MongoDBSegmentDecorator,SqlSegmentDecorator,TimerSegmentDecorator
An abstract base implementation of the
SegmentDecorator interface.-
Field Summary
Fields inherited from interface org.apache.camel.component.aws.xray.SegmentDecorator
CAMEL_COMPONENT, DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetOperationName(org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint) This method returns the operation name to use with the segment representing this exchange and endpoint.booleanThis method indicates whether the component associated with the SegmentDecorator should result in a new segment being created.voidpost(com.amazonaws.xray.entities.Entity segment, org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint) This method adds appropriate details (tags/logs) to the supplied segment based on the post processing of the exchange.voidpre(com.amazonaws.xray.entities.Entity segment, org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint) This method adds appropriate details (tags/logs) to the supplied segment based on the pre processing of the exchange.static StringstripSchemeAndOptions(org.apache.camel.Endpoint endpoint) This method removes the scheme, any leading slash characters and options from the supplied URI.toQueryParameters(String uri) Extracts any parameters passed in the given URI as a key-value representation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.component.aws.xray.SegmentDecorator
getComponent
-
Constructor Details
-
AbstractSegmentDecorator
public AbstractSegmentDecorator()
-
-
Method Details
-
newSegment
public boolean newSegment()Description copied from interface:SegmentDecoratorThis method indicates whether the component associated with the SegmentDecorator should result in a new segment being created.- Specified by:
newSegmentin interfaceSegmentDecorator- Returns:
- Whether a new segment should be created
-
getOperationName
public String getOperationName(org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint) Description copied from interface:SegmentDecoratorThis method returns the operation name to use with the segment representing this exchange and endpoint.- Specified by:
getOperationNamein interfaceSegmentDecorator- Parameters:
exchange- The exchangeendpoint- The endpoint- Returns:
- The operation name
-
pre
public void pre(com.amazonaws.xray.entities.Entity segment, org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint) Description copied from interface:SegmentDecoratorThis method adds appropriate details (tags/logs) to the supplied segment based on the pre processing of the exchange.- Specified by:
prein interfaceSegmentDecorator- Parameters:
segment- The segmentexchange- The exchangeendpoint- The endpoint
-
post
public void post(com.amazonaws.xray.entities.Entity segment, org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint) Description copied from interface:SegmentDecoratorThis method adds appropriate details (tags/logs) to the supplied segment based on the post processing of the exchange.- Specified by:
postin interfaceSegmentDecorator- Parameters:
segment- The segmentexchange- The exchangeendpoint- The endpoint
-
stripSchemeAndOptions
This method removes the scheme, any leading slash characters and options from the supplied URI. This is intended to extract a meaningful name from the URI that can be used in situations, such as the operation name.- Parameters:
endpoint- The endpoint- Returns:
- The stripped value from the URI
-
toQueryParameters
Extracts any parameters passed in the given URI as a key-value representation.- Parameters:
uri- The URI to extract passed parameters from- Returns:
- A
Maprepresentation of the contained parameters of the provided URI
-