Class OutboundMapping
java.lang.Object
io.vertx.camel.CamelMapping
io.vertx.camel.OutboundMapping
Represents a mapping between a Vert.x event bus address and a Camel endpoint.
- Author:
- Clement Escoffier
-
Field Summary
Fields inherited from class CamelMapping
DEFAULT_HEADERS_COPY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OutboundMappingCreates anOutboundMappingfrom the given Vert.x address.booleanWhether the processing is blocking and so should not be executed on the event loop.setAddress(String address) Sets the event bus address.setBlocking(boolean blocking) Sets whether or not the processing is blocking.setEndpoint(org.apache.camel.Endpoint endpoint) Sets the Camel endpoint.setHeadersCopy(boolean copyHeaders) Sets whether or not the headers of the input message are copied in the output message.Sets the Camel endpoint URI.Sets the worker thread worker used to execute the blocking processing.Fluent version ofsetUri(String).toCamel(org.apache.camel.Endpoint endpoint) Fluent version ofsetEndpoint(Endpoint).Fluent version ofsetHeadersCopy(boolean)to disable the headers copy.Methods inherited from class CamelMapping
getAddress, getUri, isHeadersCopy
-
Constructor Details
-
OutboundMapping
public OutboundMapping()
-
-
Method Details
-
fromVertx
Creates anOutboundMappingfrom the given Vert.x address.- Parameters:
address- the address - must not benull- Returns:
- the created
OutboundMapping
-
setAddress
Description copied from class:CamelMappingSets the event bus address.- Overrides:
setAddressin classCamelMapping- Parameters:
address- the address- Returns:
- the current
CamelMapping
-
setHeadersCopy
Description copied from class:CamelMappingSets whether or not the headers of the input message are copied in the output message.- Overrides:
setHeadersCopyin classCamelMapping- Parameters:
copyHeaders-trueto copy the headers- Returns:
- the current
CamelMapping
-
setUri
Description copied from class:CamelMappingSets the Camel endpoint URI.- Overrides:
setUriin classCamelMapping- Parameters:
uri- the uri- Returns:
- the current
CamelMapping
-
setEndpoint
Description copied from class:CamelMappingSets the Camel endpoint. If used,CamelMapping.setUri(String)does not need to be called.- Overrides:
setEndpointin classCamelMapping- Parameters:
endpoint- the endpoint- Returns:
- the current
CamelMapping
-
toCamel
Fluent version ofsetUri(String).- Parameters:
uri- the uri- Returns:
- the current instance of
OutboundMapping
-
toCamel
Fluent version ofsetEndpoint(Endpoint).- Parameters:
endpoint- the endpoint- Returns:
- the current instance of
OutboundMapping
-
withoutHeadersCopy
Fluent version ofsetHeadersCopy(boolean)to disable the headers copy.- Returns:
- the current instance of
OutboundMapping
-
isBlocking
public boolean isBlocking()Whether the processing is blocking and so should not be executed on the event loop.- Returns:
- whether or not the processing is blocking
-
setBlocking
Sets whether or not the processing is blocking.falseby default.- Parameters:
blocking-trueto set it to blocking.- Returns:
- the current instance of
OutboundMapping
-
getWorkerExecutor
- Returns:
- the worker thread worker to use to execute the processing. This option is only used if blocking is set to
true. If not set, it uses the the default worker worker.
-
setWorkerExecutor
Sets the worker thread worker used to execute the blocking processing. This option is only used if blocking is set totrue. If not set, it uses the the default worker worker.- Parameters:
pool- the worker worker on which the code is executed- Returns:
- the current instance of
OutboundMapping
-