Class AbstractSegmentDecorator

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String 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 newSegment()
      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> toQueryParameters​(String uri)
      Extracts any parameters passed in the given URI as a key-value representation.
    • Constructor Detail

      • AbstractSegmentDecorator

        public AbstractSegmentDecorator()
    • Method Detail

      • 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