Package org.apache.camel.spi
Interface SendDynamicAware
-
- All Superinterfaces:
AutoCloseable
,CamelContextAware
,Service
public interface SendDynamicAware extends Service, CamelContextAware
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SendDynamicAware.DynamicAwareEntry
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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Processor
createPostProcessor(Exchange exchange, SendDynamicAware.DynamicAwareEntry entry)
Creates an optional postProcessor
that will be executed afterwards when the message has been sent dynamic.Processor
createPreProcessor(Exchange exchange, SendDynamicAware.DynamicAwareEntry entry)
String
getScheme()
Gets the component nameboolean
isLenientProperties()
Whether the endpoint is lenient or not.SendDynamicAware.DynamicAwareEntry
prepare(Exchange exchange, String uri, String originalUri)
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
resolveRawParameterValues()
Whether to traverses the given parameters, and resolve any parameter values which uses the RAW token syntax: key=RAW(value).String
resolveStaticUri(Exchange exchange, SendDynamicAware.DynamicAwareEntry entry)
void
setScheme(String scheme)
Sets the component name.-
Methods inherited from interface org.apache.camel.CamelContextAware
getCamelContext, setCamelContext
-
-
-
-
Method Detail
-
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 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:
Endpoint.isLenientProperties()
-
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.
-
-