public class DefaultConsumerTemplate extends org.apache.camel.support.service.ServiceSupport implements org.apache.camel.ConsumerTemplate
Message
instances in an
Exchange
from an Endpoint
.Constructor and Description |
---|
DefaultConsumerTemplate(org.apache.camel.CamelContext camelContext) |
Modifier and Type | Method and Description |
---|---|
void |
cleanUp() |
void |
doneUoW(org.apache.camel.Exchange exchange) |
protected void |
doStart() |
protected void |
doStop() |
protected Object |
extractResultBody(org.apache.camel.Exchange result)
Extracts the body from the given result.
|
org.apache.camel.CamelContext |
getCamelContext() |
int |
getCurrentCacheSize() |
int |
getMaximumCacheSize() |
org.apache.camel.Exchange |
receive(org.apache.camel.Endpoint endpoint) |
org.apache.camel.Exchange |
receive(org.apache.camel.Endpoint endpoint,
long timeout) |
org.apache.camel.Exchange |
receive(String endpointUri) |
org.apache.camel.Exchange |
receive(String endpointUri,
long timeout) |
Object |
receiveBody(org.apache.camel.Endpoint endpoint) |
<T> T |
receiveBody(org.apache.camel.Endpoint endpoint,
Class<T> type) |
Object |
receiveBody(org.apache.camel.Endpoint endpoint,
long timeout) |
<T> T |
receiveBody(org.apache.camel.Endpoint endpoint,
long timeout,
Class<T> type) |
Object |
receiveBody(String endpointUri) |
<T> T |
receiveBody(String endpointUri,
Class<T> type) |
Object |
receiveBody(String endpointUri,
long timeout) |
<T> T |
receiveBody(String endpointUri,
long timeout,
Class<T> type) |
Object |
receiveBodyNoWait(org.apache.camel.Endpoint endpoint) |
<T> T |
receiveBodyNoWait(org.apache.camel.Endpoint endpoint,
Class<T> type) |
Object |
receiveBodyNoWait(String endpointUri) |
<T> T |
receiveBodyNoWait(String endpointUri,
Class<T> type) |
org.apache.camel.Exchange |
receiveNoWait(org.apache.camel.Endpoint endpoint) |
org.apache.camel.Exchange |
receiveNoWait(String endpointUri) |
protected org.apache.camel.Endpoint |
resolveMandatoryEndpoint(String endpointUri) |
void |
setMaximumCacheSize(int maximumCacheSize) |
doInit, doResume, doShutdown, doSuspend, getStatus, init, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public DefaultConsumerTemplate(org.apache.camel.CamelContext camelContext)
public int getMaximumCacheSize()
getMaximumCacheSize
in interface org.apache.camel.ConsumerTemplate
public void setMaximumCacheSize(int maximumCacheSize)
setMaximumCacheSize
in interface org.apache.camel.ConsumerTemplate
public int getCurrentCacheSize()
getCurrentCacheSize
in interface org.apache.camel.ConsumerTemplate
public void cleanUp()
cleanUp
in interface org.apache.camel.ConsumerTemplate
public org.apache.camel.CamelContext getCamelContext()
getCamelContext
in interface org.apache.camel.ConsumerTemplate
public org.apache.camel.Exchange receive(String endpointUri)
receive
in interface org.apache.camel.ConsumerTemplate
public org.apache.camel.Exchange receive(org.apache.camel.Endpoint endpoint)
receive
in interface org.apache.camel.ConsumerTemplate
public org.apache.camel.Exchange receive(String endpointUri, long timeout)
receive
in interface org.apache.camel.ConsumerTemplate
public org.apache.camel.Exchange receive(org.apache.camel.Endpoint endpoint, long timeout)
receive
in interface org.apache.camel.ConsumerTemplate
public org.apache.camel.Exchange receiveNoWait(String endpointUri)
receiveNoWait
in interface org.apache.camel.ConsumerTemplate
public org.apache.camel.Exchange receiveNoWait(org.apache.camel.Endpoint endpoint)
receiveNoWait
in interface org.apache.camel.ConsumerTemplate
public Object receiveBody(String endpointUri)
receiveBody
in interface org.apache.camel.ConsumerTemplate
public Object receiveBody(org.apache.camel.Endpoint endpoint)
receiveBody
in interface org.apache.camel.ConsumerTemplate
public Object receiveBody(String endpointUri, long timeout)
receiveBody
in interface org.apache.camel.ConsumerTemplate
public Object receiveBody(org.apache.camel.Endpoint endpoint, long timeout)
receiveBody
in interface org.apache.camel.ConsumerTemplate
public Object receiveBodyNoWait(String endpointUri)
receiveBodyNoWait
in interface org.apache.camel.ConsumerTemplate
public Object receiveBodyNoWait(org.apache.camel.Endpoint endpoint)
receiveBodyNoWait
in interface org.apache.camel.ConsumerTemplate
public <T> T receiveBody(String endpointUri, Class<T> type)
receiveBody
in interface org.apache.camel.ConsumerTemplate
public <T> T receiveBody(org.apache.camel.Endpoint endpoint, Class<T> type)
receiveBody
in interface org.apache.camel.ConsumerTemplate
public <T> T receiveBody(String endpointUri, long timeout, Class<T> type)
receiveBody
in interface org.apache.camel.ConsumerTemplate
public <T> T receiveBody(org.apache.camel.Endpoint endpoint, long timeout, Class<T> type)
receiveBody
in interface org.apache.camel.ConsumerTemplate
public <T> T receiveBodyNoWait(String endpointUri, Class<T> type)
receiveBodyNoWait
in interface org.apache.camel.ConsumerTemplate
public <T> T receiveBodyNoWait(org.apache.camel.Endpoint endpoint, Class<T> type)
receiveBodyNoWait
in interface org.apache.camel.ConsumerTemplate
public void doneUoW(org.apache.camel.Exchange exchange)
doneUoW
in interface org.apache.camel.ConsumerTemplate
protected org.apache.camel.Endpoint resolveMandatoryEndpoint(String endpointUri)
protected Object extractResultBody(org.apache.camel.Exchange result)
result
- the resultprotected void doStart() throws Exception
doStart
in class org.apache.camel.support.service.ServiceSupport
Exception
Apache Camel