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 the SegmentDecorator interface.
  • Field Summary

    Fields inherited from interface org.apache.camel.component.aws.xray.SegmentDecorator

    CAMEL_COMPONENT, DEFAULT
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getOperationName(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.
    boolean
    This method indicates whether the component associated with the SegmentDecorator should result in a new segment being created.
    void
    post(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.
    void
    pre(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 String
    stripSchemeAndOptions(org.apache.camel.Endpoint endpoint)
    This method removes the scheme, any leading slash characters and options from the supplied URI.
    static Map<String,String>
    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
  • Constructor Details

    • AbstractSegmentDecorator

      public AbstractSegmentDecorator()
  • Method Details

    • newSegment

      public boolean newSegment()
      Description copied from interface: SegmentDecorator
      This method indicates whether the component associated with the SegmentDecorator should result in a new segment being created.
      Specified by:
      newSegment in interface SegmentDecorator
      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: SegmentDecorator
      This method returns the operation name to use with the segment representing this exchange and endpoint.
      Specified by:
      getOperationName in interface SegmentDecorator
      Parameters:
      exchange - The exchange
      endpoint - 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: SegmentDecorator
      This method adds appropriate details (tags/logs) to the supplied segment based on the pre processing of the exchange.
      Specified by:
      pre in interface SegmentDecorator
      Parameters:
      segment - The segment
      exchange - The exchange
      endpoint - 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: SegmentDecorator
      This method adds appropriate details (tags/logs) to the supplied segment based on the post processing of the exchange.
      Specified by:
      post in interface SegmentDecorator
      Parameters:
      segment - The segment
      exchange - The exchange
      endpoint - 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
    • toQueryParameters

      public static Map<String,String> toQueryParameters(String uri)
      Extracts any parameters passed in the given URI as a key-value representation.
      Parameters:
      uri - The URI to extract passed parameters from
      Returns:
      A Map representation of the contained parameters of the provided URI