Package org.apache.camel.spi
Interface SendDynamicAware
- All Superinterfaces:
AutoCloseable
,CamelContextAware
,Service
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
An entry of detailed information from the recipient uri, which allows theSendDynamicAware
implementation to prepare pre- and post- processor and the static uri to be used for the optimised dynamic to. -
Method Summary
Modifier and TypeMethodDescriptioncreatePostProcessor
(Exchange exchange, SendDynamicAware.DynamicAwareEntry entry) Creates an optional postProcessor
that will be executed afterwards when the message has been sent dynamic.createPreProcessor
(Exchange exchange, SendDynamicAware.DynamicAwareEntry entry) Gets the component nameboolean
Whether the endpoint is lenient or not.Prepares for using optimised dynamic to by parsing the uri and returning an entry of details that are used for creating the pre and post processors, and the static uri.default boolean
Whether to traverses the given parameters, and resolve any parameter values which uses the RAW token syntax: key=RAW(value).resolveStaticUri
(Exchange exchange, SendDynamicAware.DynamicAwareEntry entry) void
Sets the component name.Methods inherited from interface org.apache.camel.CamelContextAware
getCamelContext, setCamelContext
-
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 traverses 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
SendDynamicAware.DynamicAwareEntry prepare(Exchange exchange, String uri, String originalUri) throws Exception Prepares for using optimised dynamic to by parsing the uri and returning an entry of details that are used for creating the pre and post processors, and the static uri.- 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, SendDynamicAware.DynamicAwareEntry entry) throws Exception Resolves the static part of the uri that are used for creating a singleEndpoint
andProducer
that will be reused for processing the optimised toD.- Parameters:
exchange
- the exchangeentry
- prepared information about the dynamic endpoint to use- Returns:
- the static uri, or null to not let toD use this optimisation.
- Throws:
Exception
- is thrown if error resolving the static uri.
-
createPreProcessor
Processor createPreProcessor(Exchange exchange, SendDynamicAware.DynamicAwareEntry entry) throws Exception Creates the preProcessor
that will prepare theExchange
with dynamic details from the given recipient.- Parameters:
exchange
- the exchangeentry
- prepared information about the dynamic endpoint to use- Returns:
- the processor, or null to not let toD use this optimisation.
- Throws:
Exception
- is thrown if error creating the pre processor.
-
createPostProcessor
Processor createPostProcessor(Exchange exchange, SendDynamicAware.DynamicAwareEntry entry) throws Exception Creates an optional postProcessor
that will be executed afterwards when the message has been sent dynamic.- Parameters:
exchange
- the exchangeentry
- prepared information about the dynamic endpoint to use- Returns:
- the post processor, or null if no post processor is needed.
- Throws:
Exception
- is thrown if error creating the post processor.
-