Interface PollDynamicAware

All Superinterfaces:
AutoCloseable, CamelContextAware, HasCamelContext, Service

public interface PollDynamicAware extends Service, CamelContextAware
Used for components that can optimise the usage of
invalid reference
org.apache.camel.processor.PollProcessor
(poll/pollEnrich) to reuse a static Endpoint and DynamicPollingConsumer that supports using headers to provide the dynamic parts. For example many of the file based components supports this.
  • Method Details

    • setScheme

      void setScheme(String scheme)
      Sets the component name.
      Parameters:
      scheme - name of the component
    • getScheme

      String getScheme()
      Gets the component name
    • resolveRawParameterValues

      default boolean resolveRawParameterValues()
      Whether to traverse the given parameters, and resolve any parameter values which uses the RAW token syntax: key=RAW(value). And then remove the RAW tokens, and replace the content of the value, with just the value.
    • isLenientProperties

      boolean isLenientProperties()
      Whether the endpoint is lenient or not.
      See Also:
    • prepare

      PollDynamicAware.DynamicAwareEntry prepare(Exchange exchange, String uri, String originalUri) throws Exception
      Prepares for using optimised dynamic polling consumer by parsing the uri and returning an entry of details.
      Parameters:
      exchange - the exchange
      uri - the resolved uri which is intended to be used
      originalUri - the original uri of the endpoint before any dynamic evaluation
      Returns:
      prepared information about the dynamic endpoint to use
      Throws:
      Exception - is thrown if error parsing the uri
    • resolveStaticUri

      String resolveStaticUri(Exchange exchange, PollDynamicAware.DynamicAwareEntry entry) throws Exception
      Resolves the static part of the uri that are used for creating a single Endpoint and DynamicPollingConsumer that will be reused for processing the optimised poll/pollEnrich.
      Parameters:
      exchange - the exchange
      entry - prepared information about the dynamic endpoint to use
      Returns:
      the static uri, or null to not let poll/pollEnrich use this optimisation.
      Throws:
      Exception - is thrown if error resolving the static uri.