public class DefaultFluentProducerTemplate
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.FluentProducerTemplate
The top level instance is then cloned once per message that is being built using the fluent method calls and then reset when the message has been sent.
Each cloned instance is not thread-safe as its assumed that its a single thread that calls the fluent method to build up the message to be sent.
| Constructor and Description |
|---|
DefaultFluentProducerTemplate(org.apache.camel.CamelContext context) |
| Modifier and Type | Method and Description |
|---|---|
Future<Object> |
asyncRequest() |
<T> Future<T> |
asyncRequest(Class<T> type) |
Future<org.apache.camel.Exchange> |
asyncSend() |
void |
cleanUp() |
org.apache.camel.FluentProducerTemplate |
clearAll() |
org.apache.camel.FluentProducerTemplate |
clearBody() |
org.apache.camel.FluentProducerTemplate |
clearHeaders() |
protected void |
doInit() |
protected void |
doShutdown() |
protected void |
doStart() |
protected void |
doStop() |
org.apache.camel.CamelContext |
getCamelContext() |
int |
getCurrentCacheSize() |
org.apache.camel.Endpoint |
getDefaultEndpoint() |
int |
getMaximumCacheSize() |
boolean |
isEventNotifierEnabled() |
static org.apache.camel.FluentProducerTemplate |
on(org.apache.camel.CamelContext context)
Create the FluentProducerTemplate by setting the camel context
|
static org.apache.camel.FluentProducerTemplate |
on(org.apache.camel.CamelContext context,
org.apache.camel.Endpoint endpoint)
Create the FluentProducerTemplate by setting the camel context and default endpoint
|
static org.apache.camel.FluentProducerTemplate |
on(org.apache.camel.CamelContext context,
org.apache.camel.EndpointProducerResolver resolver)
Create the FluentProducerTemplate by setting the camel context and default endpoint
|
static org.apache.camel.FluentProducerTemplate |
on(org.apache.camel.CamelContext context,
String endpoint)
Create the FluentProducerTemplate by setting the camel context and default endpoint
|
Object |
request() |
<T> T |
request(Class<T> type) |
org.apache.camel.Exchange |
send() |
void |
setDefaultEndpoint(org.apache.camel.Endpoint defaultEndpoint) |
void |
setDefaultEndpointUri(String endpointUri) |
void |
setEventNotifierEnabled(boolean eventNotifierEnabled) |
void |
setMaximumCacheSize(int maximumCacheSize) |
org.apache.camel.FluentProducerTemplate |
to(org.apache.camel.Endpoint endpoint) |
org.apache.camel.FluentProducerTemplate |
to(String endpointUri) |
org.apache.camel.FluentProducerTemplate |
withBody(Object body) |
org.apache.camel.FluentProducerTemplate |
withBodyAs(Object body,
Class<?> type) |
org.apache.camel.FluentProducerTemplate |
withDefaultEndpoint(org.apache.camel.Endpoint endpoint) |
org.apache.camel.FluentProducerTemplate |
withDefaultEndpoint(org.apache.camel.EndpointProducerResolver resolver) |
org.apache.camel.FluentProducerTemplate |
withDefaultEndpoint(String endpointUri) |
org.apache.camel.FluentProducerTemplate |
withExchange(org.apache.camel.Exchange exchange) |
org.apache.camel.FluentProducerTemplate |
withExchange(Supplier<org.apache.camel.Exchange> exchangeSupplier) |
org.apache.camel.FluentProducerTemplate |
withHeader(String key,
Object value) |
org.apache.camel.FluentProducerTemplate |
withHeaders(Map<String,Object> headers) |
org.apache.camel.FluentProducerTemplate |
withProcessor(org.apache.camel.Processor processor) |
org.apache.camel.FluentProducerTemplate |
withProcessor(Supplier<org.apache.camel.Processor> processorSupplier) |
org.apache.camel.FluentProducerTemplate |
withTemplateCustomizer(Consumer<org.apache.camel.ProducerTemplate> templateCustomizer) |
build, doBuild, doFail, doLifecycleChange, doResume, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic DefaultFluentProducerTemplate(org.apache.camel.CamelContext context)
public org.apache.camel.CamelContext getCamelContext()
getCamelContext in interface org.apache.camel.FluentProducerTemplatepublic int getCurrentCacheSize()
getCurrentCacheSize in interface org.apache.camel.FluentProducerTemplatepublic void cleanUp()
cleanUp in interface org.apache.camel.FluentProducerTemplatepublic void setDefaultEndpointUri(String endpointUri)
setDefaultEndpointUri in interface org.apache.camel.FluentProducerTemplatepublic org.apache.camel.Endpoint getDefaultEndpoint()
getDefaultEndpoint in interface org.apache.camel.FluentProducerTemplatepublic void setDefaultEndpoint(org.apache.camel.Endpoint defaultEndpoint)
setDefaultEndpoint in interface org.apache.camel.FluentProducerTemplatepublic int getMaximumCacheSize()
getMaximumCacheSize in interface org.apache.camel.FluentProducerTemplatepublic void setMaximumCacheSize(int maximumCacheSize)
setMaximumCacheSize in interface org.apache.camel.FluentProducerTemplatepublic boolean isEventNotifierEnabled()
isEventNotifierEnabled in interface org.apache.camel.FluentProducerTemplatepublic void setEventNotifierEnabled(boolean eventNotifierEnabled)
setEventNotifierEnabled in interface org.apache.camel.FluentProducerTemplatepublic org.apache.camel.FluentProducerTemplate clearAll()
clearAll in interface org.apache.camel.FluentProducerTemplatepublic org.apache.camel.FluentProducerTemplate withHeaders(Map<String,Object> headers)
withHeaders in interface org.apache.camel.FluentProducerTemplatepublic org.apache.camel.FluentProducerTemplate withHeader(String key, Object value)
withHeader in interface org.apache.camel.FluentProducerTemplatepublic org.apache.camel.FluentProducerTemplate clearHeaders()
clearHeaders in interface org.apache.camel.FluentProducerTemplatepublic org.apache.camel.FluentProducerTemplate withBody(Object body)
withBody in interface org.apache.camel.FluentProducerTemplatepublic org.apache.camel.FluentProducerTemplate withBodyAs(Object body, Class<?> type)
withBodyAs in interface org.apache.camel.FluentProducerTemplatepublic org.apache.camel.FluentProducerTemplate clearBody()
clearBody in interface org.apache.camel.FluentProducerTemplatepublic org.apache.camel.FluentProducerTemplate withDefaultEndpoint(String endpointUri)
withDefaultEndpoint in interface org.apache.camel.FluentProducerTemplatepublic org.apache.camel.FluentProducerTemplate withDefaultEndpoint(org.apache.camel.EndpointProducerResolver resolver)
withDefaultEndpoint in interface org.apache.camel.FluentProducerTemplatepublic org.apache.camel.FluentProducerTemplate withDefaultEndpoint(org.apache.camel.Endpoint endpoint)
withDefaultEndpoint in interface org.apache.camel.FluentProducerTemplatepublic org.apache.camel.FluentProducerTemplate withTemplateCustomizer(Consumer<org.apache.camel.ProducerTemplate> templateCustomizer)
withTemplateCustomizer in interface org.apache.camel.FluentProducerTemplatepublic org.apache.camel.FluentProducerTemplate withExchange(org.apache.camel.Exchange exchange)
withExchange in interface org.apache.camel.FluentProducerTemplatepublic org.apache.camel.FluentProducerTemplate withExchange(Supplier<org.apache.camel.Exchange> exchangeSupplier)
withExchange in interface org.apache.camel.FluentProducerTemplatepublic org.apache.camel.FluentProducerTemplate withProcessor(org.apache.camel.Processor processor)
withProcessor in interface org.apache.camel.FluentProducerTemplatepublic org.apache.camel.FluentProducerTemplate withProcessor(Supplier<org.apache.camel.Processor> processorSupplier)
withProcessor in interface org.apache.camel.FluentProducerTemplatepublic org.apache.camel.FluentProducerTemplate to(String endpointUri)
to in interface org.apache.camel.FluentProducerTemplatepublic org.apache.camel.FluentProducerTemplate to(org.apache.camel.Endpoint endpoint)
to in interface org.apache.camel.FluentProducerTemplatepublic Object request() throws org.apache.camel.CamelExecutionException
request in interface org.apache.camel.FluentProducerTemplateorg.apache.camel.CamelExecutionExceptionpublic <T> T request(Class<T> type) throws org.apache.camel.CamelExecutionException
request in interface org.apache.camel.FluentProducerTemplateorg.apache.camel.CamelExecutionExceptionpublic Future<Object> asyncRequest()
asyncRequest in interface org.apache.camel.FluentProducerTemplatepublic <T> Future<T> asyncRequest(Class<T> type)
asyncRequest in interface org.apache.camel.FluentProducerTemplatepublic org.apache.camel.Exchange send()
throws org.apache.camel.CamelExecutionException
send in interface org.apache.camel.FluentProducerTemplateorg.apache.camel.CamelExecutionExceptionpublic Future<org.apache.camel.Exchange> asyncSend()
asyncSend in interface org.apache.camel.FluentProducerTemplatepublic static org.apache.camel.FluentProducerTemplate on(org.apache.camel.CamelContext context)
context - the camel contextpublic static org.apache.camel.FluentProducerTemplate on(org.apache.camel.CamelContext context,
org.apache.camel.Endpoint endpoint)
context - the camel contextendpoint - the default endpointpublic static org.apache.camel.FluentProducerTemplate on(org.apache.camel.CamelContext context,
org.apache.camel.EndpointProducerResolver resolver)
context - the camel contextresolver - the default endpointpublic static org.apache.camel.FluentProducerTemplate on(org.apache.camel.CamelContext context,
String endpoint)
context - the camel contextendpoint - the default endpointprotected void doInit()
throws Exception
doInit in class org.apache.camel.support.service.BaseServiceExceptionprotected void doStart()
throws Exception
doStart in class org.apache.camel.support.service.BaseServiceExceptionprotected void doStop()
throws Exception
doStop in class org.apache.camel.support.service.BaseServiceExceptionApache Camel