Package org.apache.camel.impl.engine
Class DefaultProducerTemplate
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.impl.engine.DefaultProducerTemplate
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.ProducerTemplate,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
public class DefaultProducerTemplate
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.ProducerTemplate
Template (named like Spring's TransactionTemplate invalid input: '&' JmsTemplate et al) for working with Camel and sending
Message instances in an Exchange to an Endpoint.-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
ConstructorsConstructorDescriptionDefaultProducerTemplate(org.apache.camel.CamelContext camelContext) DefaultProducerTemplate(org.apache.camel.CamelContext camelContext, ExecutorService executor) DefaultProducerTemplate(org.apache.camel.CamelContext camelContext, org.apache.camel.Endpoint defaultEndpoint) -
Method Summary
Modifier and TypeMethodDescriptionprotected CompletableFuture<org.apache.camel.Exchange> asyncRequest(org.apache.camel.Endpoint endpoint, org.apache.camel.Processor processor, org.apache.camel.Processor resultProcessor) asyncRequestBody(String uri, Object body) <T> CompletableFuture<T> asyncRequestBody(String uri, Object body, Class<T> type) asyncRequestBody(org.apache.camel.Endpoint endpoint, Object body) <T> CompletableFuture<T> asyncRequestBody(org.apache.camel.Endpoint endpoint, Object body, Class<T> type) protected CompletableFuture<Object> asyncRequestBody(org.apache.camel.Endpoint endpoint, org.apache.camel.Processor processor) protected <T> CompletableFuture<T> asyncRequestBody(org.apache.camel.Endpoint endpoint, org.apache.camel.Processor processor, Class<T> type) protected CompletableFuture<Object> asyncRequestBody(org.apache.camel.Endpoint endpoint, org.apache.camel.Processor processor, org.apache.camel.Processor resultProcessor) asyncRequestBodyAndHeader(String endpointUri, Object body, String header, Object headerValue) <T> CompletableFuture<T> asyncRequestBodyAndHeader(String endpointUri, Object body, String header, Object headerValue, Class<T> type) asyncRequestBodyAndHeader(org.apache.camel.Endpoint endpoint, Object body, String header, Object headerValue) <T> CompletableFuture<T> asyncRequestBodyAndHeader(org.apache.camel.Endpoint endpoint, Object body, String header, Object headerValue, Class<T> type) <T> CompletableFuture<T> asyncRequestBodyAndHeaders(String endpointUri, Object body, Map<String, Object> headers, Class<T> type) asyncRequestBodyAndHeaders(org.apache.camel.Endpoint endpoint, Object body, Map<String, Object> headers) <T> CompletableFuture<T> asyncRequestBodyAndHeaders(org.apache.camel.Endpoint endpoint, Object body, Map<String, Object> headers, Class<T> type) CompletableFuture<org.apache.camel.Exchange> CompletableFuture<org.apache.camel.Exchange> CompletableFuture<org.apache.camel.Exchange> asyncSend(org.apache.camel.Endpoint endpoint, org.apache.camel.Exchange exchange) protected CompletableFuture<org.apache.camel.Exchange> asyncSend(org.apache.camel.Endpoint endpoint, org.apache.camel.ExchangePattern pattern, org.apache.camel.Processor processor, org.apache.camel.Processor resultProcessor) CompletableFuture<org.apache.camel.Exchange> asyncSend(org.apache.camel.Endpoint endpoint, org.apache.camel.Processor processor) asyncSendBody(String uri, Object body) asyncSendBody(org.apache.camel.Endpoint endpoint, Object body) protected CompletableFuture<org.apache.camel.Exchange> asyncSendExchange(org.apache.camel.Endpoint endpoint, org.apache.camel.ExchangePattern pattern, org.apache.camel.Processor processor, org.apache.camel.Processor resultProcessor, org.apache.camel.Exchange inExchange) voidcleanUp()protected org.apache.camel.ProcessorcreateBodyAndHeaderProcessor(Object body, String header, Object headerValue) protected org.apache.camel.ProcessorcreateBodyAndHeaders(Object body, Map<String, Object> headers) protected org.apache.camel.ProcessorcreateBodyAndPropertyProcessor(Object body, String property, Object propertyValue) protected Function<org.apache.camel.Exchange, org.apache.camel.Exchange> createCompletionFunction(org.apache.camel.spi.Synchronization onCompletion) protected org.apache.camel.ProcessorcreateSetBodyProcessor(Object body) protected voiddoBuild()protected voiddoInit()protected voidprotected voiddoStart()protected voiddoStop()<T> TextractFutureBody(Future<?> future, long timeout, TimeUnit unit, Class<T> type) <T> TextractFutureBody(Future<?> future, Class<T> type) protected ObjectextractResultBody(org.apache.camel.Exchange result) protected ObjectextractResultBody(org.apache.camel.Exchange result, org.apache.camel.ExchangePattern pattern) org.apache.camel.CamelContextintorg.apache.camel.Endpointprotected org.apache.camel.Endpointintbooleanbooleanstatic DefaultProducerTemplatenewInstance(org.apache.camel.CamelContext camelContext, String defaultEndpointUri) org.apache.camel.Exchangeorg.apache.camel.Exchangerequest(org.apache.camel.Endpoint endpoint, org.apache.camel.Processor processor) requestBody(Object body) <T> TrequestBody(Object body, Class<T> type) requestBody(String endpointUri, Object body) <T> TrequestBody(String endpointUri, Object body, Class<T> type) requestBody(org.apache.camel.Endpoint endpoint, Object body) <T> TrequestBody(org.apache.camel.Endpoint endpoint, Object body, Class<T> type) requestBodyAndHeader(Object body, String header, Object headerValue) requestBodyAndHeader(String endpointUri, Object body, String header, Object headerValue) <T> TrequestBodyAndHeader(String endpointUri, Object body, String header, Object headerValue, Class<T> type) requestBodyAndHeader(org.apache.camel.Endpoint endpoint, Object body, String header, Object headerValue) <T> TrequestBodyAndHeader(org.apache.camel.Endpoint endpoint, Object body, String header, Object headerValue, Class<T> type) requestBodyAndHeaders(Object body, Map<String, Object> headers) <T> TrequestBodyAndHeaders(org.apache.camel.Endpoint endpoint, Object body, Map<String, Object> headers) <T> TrequestBodyAndHeaders(org.apache.camel.Endpoint endpoint, Object body, Map<String, Object> headers, Class<T> type) protected org.apache.camel.EndpointresolveMandatoryEndpoint(String endpointUri) org.apache.camel.Exchangeorg.apache.camel.Exchangesend(String endpointUri, org.apache.camel.ExchangePattern pattern, org.apache.camel.Processor processor) org.apache.camel.Exchangeorg.apache.camel.Exchangesend(org.apache.camel.Endpoint endpoint, org.apache.camel.Exchange exchange) org.apache.camel.Exchangesend(org.apache.camel.Endpoint endpoint, org.apache.camel.ExchangePattern pattern, org.apache.camel.Processor processor) org.apache.camel.Exchangesend(org.apache.camel.Endpoint endpoint, org.apache.camel.ExchangePattern pattern, org.apache.camel.Processor processor, org.apache.camel.Processor resultProcessor) org.apache.camel.Exchangesend(org.apache.camel.Endpoint endpoint, org.apache.camel.Exchange exchange, org.apache.camel.Processor resultProcessor) org.apache.camel.Exchangesend(org.apache.camel.Endpoint endpoint, org.apache.camel.Processor processor) org.apache.camel.Exchangesend(org.apache.camel.Exchange exchange) org.apache.camel.Exchangesend(org.apache.camel.Processor processor) voidvoidvoidvoidsendBodyAndHeader(Object body, String header, Object headerValue) voidsendBodyAndHeader(String endpointUri, Object body, String header, Object headerValue) sendBodyAndHeader(String endpoint, org.apache.camel.ExchangePattern pattern, Object body, String header, Object headerValue) voidsendBodyAndHeader(org.apache.camel.Endpoint endpoint, Object body, String header, Object headerValue) sendBodyAndHeader(org.apache.camel.Endpoint endpoint, org.apache.camel.ExchangePattern pattern, Object body, String header, Object headerValue) voidsendBodyAndHeaders(Object body, Map<String, Object> headers) voidsendBodyAndHeaders(String endpointUri, org.apache.camel.ExchangePattern pattern, Object body, Map<String, Object> headers) voidsendBodyAndHeaders(org.apache.camel.Endpoint endpoint, Object body, Map<String, Object> headers) sendBodyAndHeaders(org.apache.camel.Endpoint endpoint, org.apache.camel.ExchangePattern pattern, Object body, Map<String, Object> headers) voidsendBodyAndProperty(Object body, String property, Object propertyValue) voidsendBodyAndProperty(String endpointUri, Object body, String property, Object propertyValue) sendBodyAndProperty(String endpoint, org.apache.camel.ExchangePattern pattern, Object body, String property, Object propertyValue) voidsendBodyAndProperty(org.apache.camel.Endpoint endpoint, Object body, String property, Object propertyValue) sendBodyAndProperty(org.apache.camel.Endpoint endpoint, org.apache.camel.ExchangePattern pattern, Object body, String property, Object propertyValue) voidsetDefaultEndpoint(org.apache.camel.Endpoint defaultEndpoint) voidsetDefaultEndpointUri(String endpointUri) Sets the default endpoint to use if none is specifiedvoidsetEventNotifierEnabled(boolean eventNotifierEnabled) voidsetExecutorService(ExecutorService executorService) voidsetMaximumCacheSize(int maximumCacheSize) voidsetThreadedAsyncMode(boolean useExecutor) Methods inherited from class org.apache.camel.support.service.BaseService
build, doFail, doLifecycleChange, doResume, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
DefaultProducerTemplate
public DefaultProducerTemplate(org.apache.camel.CamelContext camelContext) -
DefaultProducerTemplate
public DefaultProducerTemplate(org.apache.camel.CamelContext camelContext, ExecutorService executor) -
DefaultProducerTemplate
public DefaultProducerTemplate(org.apache.camel.CamelContext camelContext, org.apache.camel.Endpoint defaultEndpoint)
-
-
Method Details
-
newInstance
public static DefaultProducerTemplate newInstance(org.apache.camel.CamelContext camelContext, String defaultEndpointUri) -
getMaximumCacheSize
public int getMaximumCacheSize()- Specified by:
getMaximumCacheSizein interfaceorg.apache.camel.ProducerTemplate
-
setMaximumCacheSize
public void setMaximumCacheSize(int maximumCacheSize) - Specified by:
setMaximumCacheSizein interfaceorg.apache.camel.ProducerTemplate
-
isThreadedAsyncMode
public boolean isThreadedAsyncMode()- Specified by:
isThreadedAsyncModein interfaceorg.apache.camel.ProducerTemplate
-
setThreadedAsyncMode
public void setThreadedAsyncMode(boolean useExecutor) - Specified by:
setThreadedAsyncModein interfaceorg.apache.camel.ProducerTemplate
-
getCurrentCacheSize
public int getCurrentCacheSize()- Specified by:
getCurrentCacheSizein interfaceorg.apache.camel.ProducerTemplate
-
isEventNotifierEnabled
public boolean isEventNotifierEnabled()- Specified by:
isEventNotifierEnabledin interfaceorg.apache.camel.ProducerTemplate
-
cleanUp
public void cleanUp()- Specified by:
cleanUpin interfaceorg.apache.camel.ProducerTemplate
-
setEventNotifierEnabled
public void setEventNotifierEnabled(boolean eventNotifierEnabled) - Specified by:
setEventNotifierEnabledin interfaceorg.apache.camel.ProducerTemplate
-
send
- Specified by:
sendin interfaceorg.apache.camel.ProducerTemplate
-
send
- Specified by:
sendin interfaceorg.apache.camel.ProducerTemplate
-
send
public org.apache.camel.Exchange send(String endpointUri, org.apache.camel.ExchangePattern pattern, org.apache.camel.Processor processor) - Specified by:
sendin interfaceorg.apache.camel.ProducerTemplate
-
send
public org.apache.camel.Exchange send(org.apache.camel.Endpoint endpoint, org.apache.camel.Exchange exchange) - Specified by:
sendin interfaceorg.apache.camel.ProducerTemplate
-
send
public org.apache.camel.Exchange send(org.apache.camel.Endpoint endpoint, org.apache.camel.Processor processor) - Specified by:
sendin interfaceorg.apache.camel.ProducerTemplate
-
send
public org.apache.camel.Exchange send(org.apache.camel.Endpoint endpoint, org.apache.camel.ExchangePattern pattern, org.apache.camel.Processor processor) - Specified by:
sendin interfaceorg.apache.camel.ProducerTemplate
-
send
public org.apache.camel.Exchange send(org.apache.camel.Endpoint endpoint, org.apache.camel.ExchangePattern pattern, org.apache.camel.Processor processor, org.apache.camel.Processor resultProcessor) - Specified by:
sendin interfaceorg.apache.camel.ProducerTemplate
-
send
public org.apache.camel.Exchange send(org.apache.camel.Endpoint endpoint, org.apache.camel.Exchange exchange, org.apache.camel.Processor resultProcessor) -
sendBody
public Object sendBody(org.apache.camel.Endpoint endpoint, org.apache.camel.ExchangePattern pattern, Object body) - Specified by:
sendBodyin interfaceorg.apache.camel.ProducerTemplate
-
sendBody
public void sendBody(org.apache.camel.Endpoint endpoint, Object body) throws org.apache.camel.CamelExecutionException - Specified by:
sendBodyin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
sendBody
public void sendBody(String endpointUri, Object body) throws org.apache.camel.CamelExecutionException - Specified by:
sendBodyin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
sendBody
public Object sendBody(String endpointUri, org.apache.camel.ExchangePattern pattern, Object body) throws org.apache.camel.CamelExecutionException - Specified by:
sendBodyin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
sendBodyAndHeader
public void sendBodyAndHeader(String endpointUri, Object body, String header, Object headerValue) throws org.apache.camel.CamelExecutionException - Specified by:
sendBodyAndHeaderin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
sendBodyAndHeader
public void sendBodyAndHeader(org.apache.camel.Endpoint endpoint, Object body, String header, Object headerValue) throws org.apache.camel.CamelExecutionException - Specified by:
sendBodyAndHeaderin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
sendBodyAndHeader
public Object sendBodyAndHeader(org.apache.camel.Endpoint endpoint, org.apache.camel.ExchangePattern pattern, Object body, String header, Object headerValue) throws org.apache.camel.CamelExecutionException - Specified by:
sendBodyAndHeaderin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
sendBodyAndHeader
public Object sendBodyAndHeader(String endpoint, org.apache.camel.ExchangePattern pattern, Object body, String header, Object headerValue) throws org.apache.camel.CamelExecutionException - Specified by:
sendBodyAndHeaderin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
sendBodyAndProperty
public void sendBodyAndProperty(String endpointUri, Object body, String property, Object propertyValue) throws org.apache.camel.CamelExecutionException - Specified by:
sendBodyAndPropertyin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
sendBodyAndProperty
public void sendBodyAndProperty(org.apache.camel.Endpoint endpoint, Object body, String property, Object propertyValue) throws org.apache.camel.CamelExecutionException - Specified by:
sendBodyAndPropertyin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
sendBodyAndProperty
public Object sendBodyAndProperty(org.apache.camel.Endpoint endpoint, org.apache.camel.ExchangePattern pattern, Object body, String property, Object propertyValue) throws org.apache.camel.CamelExecutionException - Specified by:
sendBodyAndPropertyin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
sendBodyAndProperty
public Object sendBodyAndProperty(String endpoint, org.apache.camel.ExchangePattern pattern, Object body, String property, Object propertyValue) throws org.apache.camel.CamelExecutionException - Specified by:
sendBodyAndPropertyin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
sendBodyAndHeaders
public void sendBodyAndHeaders(String endpointUri, Object body, Map<String, Object> headers) throws org.apache.camel.CamelExecutionException- Specified by:
sendBodyAndHeadersin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
sendBodyAndHeaders
public void sendBodyAndHeaders(org.apache.camel.Endpoint endpoint, Object body, Map<String, Object> headers) throws org.apache.camel.CamelExecutionException- Specified by:
sendBodyAndHeadersin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
sendBodyAndHeaders
public Object sendBodyAndHeaders(String endpointUri, org.apache.camel.ExchangePattern pattern, Object body, Map<String, Object> headers) throws org.apache.camel.CamelExecutionException- Specified by:
sendBodyAndHeadersin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
sendBodyAndHeaders
public Object sendBodyAndHeaders(org.apache.camel.Endpoint endpoint, org.apache.camel.ExchangePattern pattern, Object body, Map<String, Object> headers) throws org.apache.camel.CamelExecutionException- Specified by:
sendBodyAndHeadersin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
request
public org.apache.camel.Exchange request(org.apache.camel.Endpoint endpoint, org.apache.camel.Processor processor) - Specified by:
requestin interfaceorg.apache.camel.ProducerTemplate
-
requestBody
- Specified by:
requestBodyin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
requestBody
public Object requestBody(org.apache.camel.Endpoint endpoint, Object body) throws org.apache.camel.CamelExecutionException - Specified by:
requestBodyin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
requestBodyAndHeader
public Object requestBodyAndHeader(Object body, String header, Object headerValue) throws org.apache.camel.CamelExecutionException - Specified by:
requestBodyAndHeaderin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
requestBodyAndHeader
public Object requestBodyAndHeader(org.apache.camel.Endpoint endpoint, Object body, String header, Object headerValue) throws org.apache.camel.CamelExecutionException - Specified by:
requestBodyAndHeaderin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
request
public org.apache.camel.Exchange request(String endpointUri, org.apache.camel.Processor processor) throws org.apache.camel.CamelExecutionException - Specified by:
requestin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
requestBody
public Object requestBody(String endpointUri, Object body) throws org.apache.camel.CamelExecutionException - Specified by:
requestBodyin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
requestBodyAndHeader
public Object requestBodyAndHeader(String endpointUri, Object body, String header, Object headerValue) throws org.apache.camel.CamelExecutionException - Specified by:
requestBodyAndHeaderin interfaceorg.apache.camel.ProducerTemplate- Throws:
org.apache.camel.CamelExecutionException
-
requestBodyAndHeaders
- Specified by:
requestBodyAndHeadersin interfaceorg.apache.camel.ProducerTemplate
-
requestBodyAndHeaders
public Object requestBodyAndHeaders(org.apache.camel.Endpoint endpoint, Object body, Map<String, Object> headers) - Specified by:
requestBodyAndHeadersin interfaceorg.apache.camel.ProducerTemplate
-
requestBodyAndHeaders
- Specified by:
requestBodyAndHeadersin interfaceorg.apache.camel.ProducerTemplate
-
requestBody
- Specified by:
requestBodyin interfaceorg.apache.camel.ProducerTemplate
-
requestBody
- Specified by:
requestBodyin interfaceorg.apache.camel.ProducerTemplate
-
requestBody
- Specified by:
requestBodyin interfaceorg.apache.camel.ProducerTemplate
-
requestBodyAndHeader
public <T> T requestBodyAndHeader(org.apache.camel.Endpoint endpoint, Object body, String header, Object headerValue, Class<T> type) - Specified by:
requestBodyAndHeaderin interfaceorg.apache.camel.ProducerTemplate
-
requestBodyAndHeader
public <T> T requestBodyAndHeader(String endpointUri, Object body, String header, Object headerValue, Class<T> type) - Specified by:
requestBodyAndHeaderin interfaceorg.apache.camel.ProducerTemplate
-
requestBodyAndHeaders
public <T> T requestBodyAndHeaders(String endpointUri, Object body, Map<String, Object> headers, Class<T> type) - Specified by:
requestBodyAndHeadersin interfaceorg.apache.camel.ProducerTemplate
-
requestBodyAndHeaders
public <T> T requestBodyAndHeaders(org.apache.camel.Endpoint endpoint, Object body, Map<String, Object> headers, Class<T> type) - Specified by:
requestBodyAndHeadersin interfaceorg.apache.camel.ProducerTemplate
-
sendBody
- Specified by:
sendBodyin interfaceorg.apache.camel.ProducerTemplate
-
send
public org.apache.camel.Exchange send(org.apache.camel.Exchange exchange) - Specified by:
sendin interfaceorg.apache.camel.ProducerTemplate
-
send
public org.apache.camel.Exchange send(org.apache.camel.Processor processor) - Specified by:
sendin interfaceorg.apache.camel.ProducerTemplate
-
sendBodyAndHeader
- Specified by:
sendBodyAndHeaderin interfaceorg.apache.camel.ProducerTemplate
-
sendBodyAndProperty
- Specified by:
sendBodyAndPropertyin interfaceorg.apache.camel.ProducerTemplate
-
sendBodyAndHeaders
- Specified by:
sendBodyAndHeadersin interfaceorg.apache.camel.ProducerTemplate
-
getCamelContext
public org.apache.camel.CamelContext getCamelContext()- Specified by:
getCamelContextin interfaceorg.apache.camel.ProducerTemplate
-
getDefaultEndpoint
public org.apache.camel.Endpoint getDefaultEndpoint()- Specified by:
getDefaultEndpointin interfaceorg.apache.camel.ProducerTemplate
-
setDefaultEndpoint
public void setDefaultEndpoint(org.apache.camel.Endpoint defaultEndpoint) - Specified by:
setDefaultEndpointin interfaceorg.apache.camel.ProducerTemplate
-
setDefaultEndpointUri
Sets the default endpoint to use if none is specified- Specified by:
setDefaultEndpointUriin interfaceorg.apache.camel.ProducerTemplate
-
createBodyAndHeaderProcessor
-
createBodyAndHeaders
-
createBodyAndPropertyProcessor
-
createSetBodyProcessor
-
createCompletionFunction
protected Function<org.apache.camel.Exchange,org.apache.camel.Exchange> createCompletionFunction(org.apache.camel.spi.Synchronization onCompletion) -
resolveMandatoryEndpoint
-
getMandatoryDefaultEndpoint
protected org.apache.camel.Endpoint getMandatoryDefaultEndpoint() -
extractResultBody
-
extractResultBody
protected Object extractResultBody(org.apache.camel.Exchange result, org.apache.camel.ExchangePattern pattern) -
setExecutorService
- Specified by:
setExecutorServicein interfaceorg.apache.camel.ProducerTemplate
-
asyncSend
public CompletableFuture<org.apache.camel.Exchange> asyncSend(String uri, org.apache.camel.Exchange exchange) - Specified by:
asyncSendin interfaceorg.apache.camel.ProducerTemplate
-
asyncSend
public CompletableFuture<org.apache.camel.Exchange> asyncSend(String uri, org.apache.camel.Processor processor) - Specified by:
asyncSendin interfaceorg.apache.camel.ProducerTemplate
-
asyncSendBody
- Specified by:
asyncSendBodyin interfaceorg.apache.camel.ProducerTemplate
-
asyncRequestBody
- Specified by:
asyncRequestBodyin interfaceorg.apache.camel.ProducerTemplate
-
asyncRequestBody
- Specified by:
asyncRequestBodyin interfaceorg.apache.camel.ProducerTemplate
-
asyncRequestBodyAndHeader
public CompletableFuture<Object> asyncRequestBodyAndHeader(String endpointUri, Object body, String header, Object headerValue) - Specified by:
asyncRequestBodyAndHeaderin interfaceorg.apache.camel.ProducerTemplate
-
asyncRequestBodyAndHeader
public <T> CompletableFuture<T> asyncRequestBodyAndHeader(String endpointUri, Object body, String header, Object headerValue, Class<T> type) - Specified by:
asyncRequestBodyAndHeaderin interfaceorg.apache.camel.ProducerTemplate
-
asyncRequestBodyAndHeaders
public CompletableFuture<Object> asyncRequestBodyAndHeaders(String endpointUri, Object body, Map<String, Object> headers) - Specified by:
asyncRequestBodyAndHeadersin interfaceorg.apache.camel.ProducerTemplate
-
asyncRequestBodyAndHeaders
public <T> CompletableFuture<T> asyncRequestBodyAndHeaders(String endpointUri, Object body, Map<String, Object> headers, Class<T> type) - Specified by:
asyncRequestBodyAndHeadersin interfaceorg.apache.camel.ProducerTemplate
-
extractFutureBody
- Specified by:
extractFutureBodyin interfaceorg.apache.camel.ProducerTemplate
-
extractFutureBody
public <T> T extractFutureBody(Future<?> future, long timeout, TimeUnit unit, Class<T> type) throws TimeoutException - Specified by:
extractFutureBodyin interfaceorg.apache.camel.ProducerTemplate- Throws:
TimeoutException
-
asyncRequestBody
- Specified by:
asyncRequestBodyin interfaceorg.apache.camel.ProducerTemplate
-
asyncRequestBody
public <T> CompletableFuture<T> asyncRequestBody(org.apache.camel.Endpoint endpoint, Object body, Class<T> type) - Specified by:
asyncRequestBodyin interfaceorg.apache.camel.ProducerTemplate
-
asyncRequestBodyAndHeader
public CompletableFuture<Object> asyncRequestBodyAndHeader(org.apache.camel.Endpoint endpoint, Object body, String header, Object headerValue) - Specified by:
asyncRequestBodyAndHeaderin interfaceorg.apache.camel.ProducerTemplate
-
asyncRequestBody
protected <T> CompletableFuture<T> asyncRequestBody(org.apache.camel.Endpoint endpoint, org.apache.camel.Processor processor, Class<T> type) -
asyncRequestBodyAndHeader
public <T> CompletableFuture<T> asyncRequestBodyAndHeader(org.apache.camel.Endpoint endpoint, Object body, String header, Object headerValue, Class<T> type) - Specified by:
asyncRequestBodyAndHeaderin interfaceorg.apache.camel.ProducerTemplate
-
asyncRequestBodyAndHeaders
public CompletableFuture<Object> asyncRequestBodyAndHeaders(org.apache.camel.Endpoint endpoint, Object body, Map<String, Object> headers) - Specified by:
asyncRequestBodyAndHeadersin interfaceorg.apache.camel.ProducerTemplate
-
asyncRequestBodyAndHeaders
public <T> CompletableFuture<T> asyncRequestBodyAndHeaders(org.apache.camel.Endpoint endpoint, Object body, Map<String, Object> headers, Class<T> type) - Specified by:
asyncRequestBodyAndHeadersin interfaceorg.apache.camel.ProducerTemplate
-
asyncSend
public CompletableFuture<org.apache.camel.Exchange> asyncSend(org.apache.camel.Endpoint endpoint, org.apache.camel.Exchange exchange) - Specified by:
asyncSendin interfaceorg.apache.camel.ProducerTemplate
-
asyncSend
public CompletableFuture<org.apache.camel.Exchange> asyncSend(org.apache.camel.Endpoint endpoint, org.apache.camel.Processor processor) - Specified by:
asyncSendin interfaceorg.apache.camel.ProducerTemplate
-
asyncSendBody
- Specified by:
asyncSendBodyin interfaceorg.apache.camel.ProducerTemplate
-
asyncRequestBody
protected CompletableFuture<Object> asyncRequestBody(org.apache.camel.Endpoint endpoint, org.apache.camel.Processor processor) -
asyncRequestBody
protected CompletableFuture<Object> asyncRequestBody(org.apache.camel.Endpoint endpoint, org.apache.camel.Processor processor, org.apache.camel.Processor resultProcessor) -
asyncRequest
protected CompletableFuture<org.apache.camel.Exchange> asyncRequest(org.apache.camel.Endpoint endpoint, org.apache.camel.Processor processor, org.apache.camel.Processor resultProcessor) -
asyncSend
protected CompletableFuture<org.apache.camel.Exchange> asyncSend(org.apache.camel.Endpoint endpoint, org.apache.camel.ExchangePattern pattern, org.apache.camel.Processor processor, org.apache.camel.Processor resultProcessor) -
asyncSendExchange
protected CompletableFuture<org.apache.camel.Exchange> asyncSendExchange(org.apache.camel.Endpoint endpoint, org.apache.camel.ExchangePattern pattern, org.apache.camel.Processor processor, org.apache.camel.Processor resultProcessor, org.apache.camel.Exchange inExchange) -
doBuild
- Overrides:
doBuildin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
doInit
- Overrides:
doInitin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
doStart
- Overrides:
doStartin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
doStop
- Overrides:
doStopin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
doShutdown
- Overrides:
doShutdownin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-