|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.impl.DefaultConsumerTemplate
public class DefaultConsumerTemplate
Constructor Summary | |
---|---|
DefaultConsumerTemplate(CamelContext context)
|
Method Summary | ||
---|---|---|
protected Object |
extractResultBody(Exchange result)
Extracts the body from the given result. |
|
CamelContext |
getCamelContext()
|
|
Exchange |
receive(Endpoint endpoinit)
Receives from the endpoint, waiting until there is a response |
|
Exchange |
receive(Endpoint endpoint,
long timeout)
Receives from the endpoint, waiting until there is a response or the timeout occurs |
|
Exchange |
receive(String endpointUri)
Receives from the endpoint, waiting until there is a response |
|
Exchange |
receive(String endpointUri,
long timeout)
Receives from the endpoint, waiting until there is a response or the timeout occurs |
|
Object |
receiveBody(Endpoint endpoint)
Receives from the endpoint, waiting until there is a response |
|
|
receiveBody(Endpoint endpoint,
Class<T> type)
Receives from the endpoint, waiting until there is a response |
|
Object |
receiveBody(Endpoint endpoint,
long timeout)
Receives from the endpoint, waiting until there is a response or the timeout occurs |
|
|
receiveBody(Endpoint endpoint,
long timeout,
Class<T> type)
Receives from the endpoint, waiting until there is a response or the timeout occurs |
|
Object |
receiveBody(String endpointUri)
Receives from the endpoint, waiting until there is a response |
|
|
receiveBody(String endpointUri,
Class<T> type)
Receives from the endpoint, waiting until there is a response |
|
Object |
receiveBody(String endpointUri,
long timeout)
Receives from the endpoint, waiting until there is a response or the timeout occurs |
|
|
receiveBody(String endpointUri,
long timeout,
Class<T> type)
Receives from the endpoint, waiting until there is a response or the timeout occurs |
|
Object |
receiveBodyNoWait(Endpoint endpoint)
Receives from the endpoint, not waiting for a response if non exists. |
|
|
receiveBodyNoWait(Endpoint endpoint,
Class<T> type)
Receives from the endpoint, not waiting for a response if non exists. |
|
Object |
receiveBodyNoWait(String endpointUri)
Receives from the endpoint, not waiting for a response if non exists. |
|
|
receiveBodyNoWait(String endpointUri,
Class<T> type)
Receives from the endpoint, not waiting for a response if non exists. |
|
Exchange |
receiveNoWait(Endpoint endpoint)
Receives from the endpoint, not waiting for a response if non exists. |
|
Exchange |
receiveNoWait(String endpointUri)
Receives from the endpoint, not waiting for a response if non exists. |
|
protected Endpoint |
resolveMandatoryEndpoint(String endpointUri)
|
|
void |
start()
Starts the service |
|
void |
stop()
Stops the service |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultConsumerTemplate(CamelContext context)
Method Detail |
---|
public void start() throws Exception
Service
start
in interface Service
Exception
- is thrown if starting failedpublic void stop() throws Exception
Service
stop
in interface Service
Exception
- is thrown if stopping failedpublic CamelContext getCamelContext()
public Exchange receive(String endpointUri)
ConsumerTemplate
receive
in interface ConsumerTemplate
endpointUri
- the endpoint to receive from
public Exchange receive(Endpoint endpoinit)
ConsumerTemplate
receive
in interface ConsumerTemplate
endpoinit
- the endpoint to receive from
public Exchange receive(String endpointUri, long timeout)
ConsumerTemplate
receive
in interface ConsumerTemplate
endpointUri
- the endpoint to receive fromtimeout
- timeout in millis to wait for a response
public Exchange receive(Endpoint endpoint, long timeout)
ConsumerTemplate
receive
in interface ConsumerTemplate
endpoint
- the endpoint to receive fromtimeout
- timeout in millis to wait for a response
public Exchange receiveNoWait(String endpointUri)
ConsumerTemplate
receiveNoWait
in interface ConsumerTemplate
endpointUri
- the endpoint to receive from
public Exchange receiveNoWait(Endpoint endpoint)
ConsumerTemplate
receiveNoWait
in interface ConsumerTemplate
endpoint
- the endpoint to receive from
public Object receiveBody(String endpointUri)
ConsumerTemplate
receiveBody
in interface ConsumerTemplate
endpointUri
- the endpoint to receive from
public Object receiveBody(Endpoint endpoint)
ConsumerTemplate
receiveBody
in interface ConsumerTemplate
endpoint
- the endpoint to receive from
public Object receiveBody(String endpointUri, long timeout)
ConsumerTemplate
receiveBody
in interface ConsumerTemplate
endpointUri
- the endpoint to receive fromtimeout
- timeout in millis to wait for a response
public Object receiveBody(Endpoint endpoint, long timeout)
ConsumerTemplate
receiveBody
in interface ConsumerTemplate
endpoint
- the endpoint to receive fromtimeout
- timeout in millis to wait for a response
public Object receiveBodyNoWait(String endpointUri)
ConsumerTemplate
receiveBodyNoWait
in interface ConsumerTemplate
endpointUri
- the endpoint to receive from
public Object receiveBodyNoWait(Endpoint endpoint)
ConsumerTemplate
receiveBodyNoWait
in interface ConsumerTemplate
endpoint
- the endpoint to receive from
public <T> T receiveBody(String endpointUri, Class<T> type)
ConsumerTemplate
receiveBody
in interface ConsumerTemplate
endpointUri
- the endpoint to receive fromtype
- the expected response type
public <T> T receiveBody(Endpoint endpoint, Class<T> type)
ConsumerTemplate
receiveBody
in interface ConsumerTemplate
endpoint
- the endpoint to receive fromtype
- the expected response type
public <T> T receiveBody(String endpointUri, long timeout, Class<T> type)
ConsumerTemplate
receiveBody
in interface ConsumerTemplate
endpointUri
- the endpoint to receive fromtimeout
- timeout in millis to wait for a responsetype
- the expected response type
public <T> T receiveBody(Endpoint endpoint, long timeout, Class<T> type)
ConsumerTemplate
receiveBody
in interface ConsumerTemplate
endpoint
- the endpoint to receive fromtimeout
- timeout in millis to wait for a responsetype
- the expected response type
public <T> T receiveBodyNoWait(String endpointUri, Class<T> type)
ConsumerTemplate
receiveBodyNoWait
in interface ConsumerTemplate
endpointUri
- the endpoint to receive fromtype
- the expected response type
public <T> T receiveBodyNoWait(Endpoint endpoint, Class<T> type)
ConsumerTemplate
receiveBodyNoWait
in interface ConsumerTemplate
endpoint
- the endpoint to receive fromtype
- the expected response type
protected Endpoint resolveMandatoryEndpoint(String endpointUri)
protected Object extractResultBody(Exchange result)
result
- the result
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |