Package org.apache.camel.spi
Interface PollDynamicAware
- All Superinterfaces:
AutoCloseable
,CamelContextAware
,HasCamelContext
,Service
Used for components that can optimise the usage of
(poll/pollEnrich)
to reuse a static
invalid reference
org.apache.camel.processor.PollProcessor
Endpoint
and DynamicPollingConsumer
that supports using headers to
provide the dynamic parts. For example many of the file based components supports this.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
An entry of detailed information from the recipient uri, which allows thePollDynamicAware
implementation to prepare the static uri to be used for the optimised poll. -
Method Summary
Modifier and TypeMethodDescriptionGets the component nameboolean
Whether the endpoint is lenient or not.Prepares for using optimised dynamic polling consumer by parsing the uri and returning an entry of details.default boolean
Whether to traverse the given parameters, and resolve any parameter values which uses the RAW token syntax: key=RAW(value).resolveStaticUri
(Exchange exchange, PollDynamicAware.DynamicAwareEntry entry) Resolves the static part of the uri that are used for creating a singleEndpoint
andDynamicPollingConsumer
that will be reused for processing the optimised poll/pollEnrich.void
Sets the component name.Methods inherited from interface org.apache.camel.CamelContextAware
setCamelContext
Methods inherited from interface org.apache.camel.spi.HasCamelContext
getCamelContext
-
Method Details
-
setScheme
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 exchangeuri
- the resolved uri which is intended to be usedoriginalUri
- 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 singleEndpoint
andDynamicPollingConsumer
that will be reused for processing the optimised poll/pollEnrich.- Parameters:
exchange
- the exchangeentry
- 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.
-