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
public abstract class AbstractSegmentDecorator extends Object implements SegmentDecorator
An abstract base implementation of theSegmentDecoratorinterface.
-
-
Field Summary
-
Fields inherited from interface org.apache.camel.component.aws.xray.SegmentDecorator
CAMEL_COMPONENT, DEFAULT
-
-
Constructor Summary
Constructors Constructor Description AbstractSegmentDecorator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetOperationName(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.booleannewSegment()This 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.static Map<String,String>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, wait
-
Methods inherited from interface org.apache.camel.component.aws.xray.SegmentDecorator
getComponent
-
-
-
-
Method Detail
-
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
public static String stripSchemeAndOptions(org.apache.camel.Endpoint endpoint)
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
-
-