public class Responder
extends org.apache.camel.processor.DelegateProcessor
Exchange
is sent to a
responseGeneratorProcessor
(set at construction time) that is
generating a response message from the original Exchange
. The
response is then communicated back to the initiator and the original exchange
is forwarded to the next processor as in-only Exchange
.Constructor and Description |
---|
Responder(org.apache.camel.Processor responseGeneratorProcessor)
Creates a new
Responder . |
Responder(org.apache.camel.Producer responseGeneratorProducer)
Creates a new
Responder . |
Modifier and Type | Method and Description |
---|---|
protected org.apache.camel.Exchange |
createDelegateExchange(org.apache.camel.Exchange source)
Creates the exchange for the next processor returned by
DelegateProcessor.getProcessor() from a source exchange. |
protected void |
doStart() |
protected void |
doStop() |
protected boolean |
process(org.apache.camel.Exchange original,
org.apache.camel.Exchange response)
Processes the
original exchange and the
response exchange (returned from a
responseGeneratorProcessor ) and returns a decision whether
to continue processing. |
protected void |
processNext(org.apache.camel.Exchange exchange)
Sends the incoming
Exchange to an
responseGeneratorProcessor (set at construction time) that
is generating a response message from the original Exchange . |
getProcessor, hasNext, next, process, setProcessor, toString
public Responder(org.apache.camel.Processor responseGeneratorProcessor)
Responder
.responseGeneratorProcessor
- processor that generates the response message for an exchange.public Responder(org.apache.camel.Producer responseGeneratorProducer)
Responder
.responseGeneratorProducer
- producer that generates the response message for an exchange.protected void processNext(org.apache.camel.Exchange exchange) throws Exception
Exchange
to an
responseGeneratorProcessor
(set at construction time) that
is generating a response message from the original Exchange
. The
response is then communicated back to the initiator and the original
exchange is forwarded to the next processor as in-only Exchange
.processNext
in class org.apache.camel.processor.DelegateProcessor
exchange
- original exchange.Exception
protected boolean process(org.apache.camel.Exchange original, org.apache.camel.Exchange response)
original
exchange and the
response
exchange (returned from a
responseGeneratorProcessor
) and returns a decision whether
to continue processing. The default implementation always returns
true
. This method is intended to be overwritten by
subclasses.original
- original message exchange.response
- response message exchange.true
if processing shall continue,
false
otherwise.protected org.apache.camel.Exchange createDelegateExchange(org.apache.camel.Exchange source)
DelegateProcessor.getProcessor()
from a source exchange.source
- a source exchange.protected void doStart() throws Exception
doStart
in class org.apache.camel.processor.DelegateProcessor
Exception
Copyright © 2018 Open eHealth Foundation. All rights reserved.