Package org.apache.camel.spi
Interface SendDynamicAware
-
public interface SendDynamicAware
-
-
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 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 nameSendDynamicAware.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.String
resolveStaticUri(Exchange exchange, SendDynamicAware.DynamicAwareEntry entry)
void
setScheme(String scheme)
Sets the component name.
-
-
-
Method Detail
-
setScheme
void setScheme(String scheme)
Sets the component name.- Parameters:
scheme
- name of the component
-
getScheme
String getScheme()
Gets the component name
-
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.
-
-