@Metadata(label="eip,endpoint,routing") public class WireTapDefinition<Type extends ProcessorDefinition<Type>> extends NoOutputDefinition<WireTapDefinition<Type>> implements ExecutorServiceAwareDefinition<WireTapDefinition<Type>>, EndpointRequiredDefinition
| Modifier and Type | Field and Description |
|---|---|
protected Endpoint |
endpoint |
protected String |
ref
Deprecated.
|
protected String |
uri |
inheritErrorHandler, log| Constructor and Description |
|---|
WireTapDefinition() |
WireTapDefinition(Endpoint endpoint) |
WireTapDefinition(String uri) |
| Modifier and Type | Method and Description |
|---|---|
void |
addOutput(ProcessorDefinition<?> output)
Adds the given definition as output to this block
|
WireTapDefinition<Type> |
copy()
Uses a copy of the original exchange
|
WireTapDefinition<Type> |
copy(boolean copy)
Uses a copy of the original exchange
|
Processor |
createProcessor(RouteContext routeContext)
Override this in definition class and implement logic to create the processor
based on the definition model.
|
protected String |
description() |
Type |
end()
Ends the current block
|
WireTapDefinition<Type> |
executorService(ExecutorService executorService)
Uses a custom thread pool
|
WireTapDefinition<Type> |
executorServiceRef(String executorServiceRef)
Uses a custom thread pool
|
Boolean |
getCopy() |
Endpoint |
getEndpoint() |
String |
getEndpointUri()
Gets the uri of the endpoint used by this definition.
|
ExecutorService |
getExecutorService()
Gets the executor service
|
String |
getExecutorServiceRef()
Gets the reference to lookup in the
Registry for the executor service to be used. |
List<SetHeaderDefinition> |
getHeaders() |
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node
|
ExpressionSubElementDefinition |
getNewExchangeExpression() |
Processor |
getNewExchangeProcessor() |
String |
getNewExchangeProcessorRef() |
Processor |
getOnPrepare() |
String |
getOnPrepareRef() |
ExchangePattern |
getPattern() |
String |
getRef() |
String |
getUri() |
WireTapDefinition<Type> |
newExchange(Expression expression)
Deprecated.
will be removed in Camel 3.0 Instead use
newExchangeBody(org.apache.camel.Expression) |
WireTapDefinition<Type> |
newExchange(Processor processor)
Sends a new Exchange, instead of tapping an existing, using
ExchangePattern.InOnly |
WireTapDefinition<Type> |
newExchangeBody(Expression expression)
Sends a new Exchange, instead of tapping an existing, using
ExchangePattern.InOnly |
WireTapDefinition<Type> |
newExchangeHeader(String headerName,
Expression expression)
Sets a header on the new Exchange, instead of tapping an existing, using
ExchangePattern.InOnly. |
WireTapDefinition<Type> |
newExchangeRef(String ref)
Sends a new Exchange, instead of tapping an existing, using
ExchangePattern.InOnly |
WireTapDefinition<Type> |
onPrepare(Processor onPrepare)
|
WireTapDefinition<Type> |
onPrepareRef(String onPrepareRef)
|
Endpoint |
resolveEndpoint(RouteContext context) |
void |
setCopy(Boolean copy) |
void |
setEndpoint(Endpoint endpoint) |
void |
setExecutorService(ExecutorService executorService)
Sets the executor service to be used.
|
void |
setExecutorServiceRef(String executorServiceRef)
Sets a reference to lookup in the
Registry for the executor service to be used. |
void |
setHeaders(List<SetHeaderDefinition> headers) |
void |
setNewExchangeExpression(Expression expression) |
void |
setNewExchangeExpression(ExpressionSubElementDefinition expression)
Expression used for creating a new body as the message to use for wire tapping
|
void |
setNewExchangeProcessor(Processor processor)
To use a Processor for creating a new body as the message to use for wire tapping
|
void |
setNewExchangeProcessorRef(String ref)
Reference to a Processor to use for creating a new body as the message to use for wire tapping
|
void |
setOnPrepare(Processor onPrepare) |
void |
setOnPrepareRef(String onPrepareRef) |
void |
setRef(String ref)
Deprecated.
use uri with ref:uri instead
|
void |
setUri(String uri)
Uri of the endpoint to use as wire tap
|
String |
toString() |
getOutputs, isOutputSupportedaddInterceptStrategies, addInterceptStrategy, addRoutes, aggregate, aggregate, aggregate, aggregate, aop, attribute, bean, bean, bean, bean, bean, bean, bean, beanRef, beanRef, beanRef, beanRef, beanRef, choice, clearOutput, configureChild, convertBodyTo, convertBodyTo, createChannel, createChildProcessor, createCompositeProcessor, createOutputsProcessor, createOutputsProcessor, createOutputsProcessorImpl, createProcessor, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, endChoice, endDoTry, endParent, endRest, enrich, enrich, enrich, enrichRef, enrichRef, filter, filter, filter, filter, getIndex, getInterceptStrategies, getOtherAttributes, getParent, id, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, inOut, isAbstract, isInheritErrorHandler, isTopLevelOnly, loadBalance, loadBalance, log, log, log, log, log, log, loop, loop, loop, makeProcessor, markRollbackOnly, markRollbackOnlyLast, marshal, marshal, marshal, marshal, multicast, multicast, multicast, onCompletion, onException, onException, pipeline, pipeline, pipeline, pipeline, placeholder, policy, policy, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrichRef, pollEnrichRef, preCreateProcessor, process, processRef, recipientList, recipientList, recipientList, recipientList, removeFaultHeader, removeHeader, removeHeaders, removeHeaders, removeProperties, removeProperties, removeProperty, resequence, resequence, rollback, rollback, routeDescription, routeId, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, sample, sample, sample, setBody, setBody, setExchangePattern, setFaultBody, setFaultHeader, setHeader, setHeader, setInheritErrorHandler, setOtherAttributes, setOutHeader, setOutHeader, setParent, setProperty, setProperty, sort, sort, sort, split, split, split, startupOrder, stop, threads, threads, threads, threads, throttle, throttle, throwException, to, to, to, to, to, to, to, to, to, to, toF, transacted, transacted, transform, transform, unmarshal, unmarshal, unmarshal, unmarshal, validate, validate, validate, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wrapChannel, wrapInErrorHandler, wrapProcessordescription, description, getCustomId, getDescription, getDescriptionText, getId, getShortName, hasCustomIdAssigned, idOrCreate, setCustomId, setDescription, setIdprotected String uri
@Deprecated protected String ref
protected Endpoint endpoint
public WireTapDefinition()
public WireTapDefinition(String uri)
public WireTapDefinition(Endpoint endpoint)
public String getEndpointUri()
EndpointRequiredDefinitiongetEndpointUri in interface EndpointRequiredDefinitionpublic Processor createProcessor(RouteContext routeContext) throws Exception
ProcessorDefinitioncreateProcessor in class ProcessorDefinition<WireTapDefinition<Type extends ProcessorDefinition<Type>>>Exceptionpublic ExchangePattern getPattern()
protected String description()
public String getLabel()
ProcessorDefinitiongetLabel in interface NamedNodegetLabel in class ProcessorDefinition<WireTapDefinition<Type extends ProcessorDefinition<Type>>>public Type end()
ProcessorDefinitionend in class ProcessorDefinition<WireTapDefinition<Type extends ProcessorDefinition<Type>>>public void addOutput(ProcessorDefinition<?> output)
BlockaddOutput in interface BlockaddOutput in class ProcessorDefinition<WireTapDefinition<Type extends ProcessorDefinition<Type>>>output - the processor definitionpublic Endpoint resolveEndpoint(RouteContext context)
public WireTapDefinition<Type> executorService(ExecutorService executorService)
executorService in interface ExecutorServiceAwareDefinition<WireTapDefinition<Type extends ProcessorDefinition<Type>>>executorService - a custom ExecutorService to use as thread pool
for sending tapped exchangespublic WireTapDefinition<Type> executorServiceRef(String executorServiceRef)
executorServiceRef in interface ExecutorServiceAwareDefinition<WireTapDefinition<Type extends ProcessorDefinition<Type>>>executorServiceRef - reference to lookup a custom ExecutorService
to use as thread pool for sending tapped exchangespublic WireTapDefinition<Type> copy()
public WireTapDefinition<Type> copy(boolean copy)
copy - if it is true camel will copy the original exchange,
if it is false camel will not copy the original exchange@Deprecated public WireTapDefinition<Type> newExchange(Expression expression)
newExchangeBody(org.apache.camel.Expression)public WireTapDefinition<Type> newExchangeBody(Expression expression)
ExchangePattern.InOnlyexpression - expression that creates the new body to sendnewExchangeHeader(String, org.apache.camel.Expression)public WireTapDefinition<Type> newExchangeRef(String ref)
ExchangePattern.InOnlypublic WireTapDefinition<Type> newExchange(Processor processor)
ExchangePattern.InOnlyprocessor - processor preparing the new exchange to sendnewExchangeHeader(String, org.apache.camel.Expression)public WireTapDefinition<Type> newExchangeHeader(String headerName, Expression expression)
ExchangePattern.InOnly.
Use this together with the newExchange(org.apache.camel.Expression) or newExchange(org.apache.camel.Processor)
methods.headerName - the header nameexpression - the expression setting the header valuepublic WireTapDefinition<Type> onPrepare(Processor onPrepare)
Processor when preparing the Exchange to be send.
This can be used to deep-clone messages that should be send, or any custom logic needed before
the exchange is send.onPrepare - the processorpublic WireTapDefinition<Type> onPrepareRef(String onPrepareRef)
Processor when preparing the Exchange to be send.
This can be used to deep-clone messages that should be send, or any custom logic needed before
the exchange is send.onPrepareRef - reference to the processor to lookup in the Registrypublic String getUri()
public void setUri(String uri)
public String getRef()
@Deprecated public void setRef(String ref)
public Endpoint getEndpoint()
public void setEndpoint(Endpoint endpoint)
public Processor getNewExchangeProcessor()
public void setNewExchangeProcessor(Processor processor)
public String getNewExchangeProcessorRef()
public void setNewExchangeProcessorRef(String ref)
public ExpressionSubElementDefinition getNewExchangeExpression()
public void setNewExchangeExpression(ExpressionSubElementDefinition expression)
public void setNewExchangeExpression(Expression expression)
public ExecutorService getExecutorService()
ExecutorServiceAwaregetExecutorService in interface ExecutorServiceAwarepublic void setExecutorService(ExecutorService executorService)
ExecutorServiceAwaresetExecutorService in interface ExecutorServiceAwareexecutorService - the executorpublic String getExecutorServiceRef()
ExecutorServiceAwareRegistry for the executor service to be used.getExecutorServiceRef in interface ExecutorServiceAwarepublic void setExecutorServiceRef(String executorServiceRef)
ExecutorServiceAwareRegistry for the executor service to be used.setExecutorServiceRef in interface ExecutorServiceAwareexecutorServiceRef - reference for the executorpublic Boolean getCopy()
public void setCopy(Boolean copy)
public String getOnPrepareRef()
public void setOnPrepareRef(String onPrepareRef)
public Processor getOnPrepare()
public void setOnPrepare(Processor onPrepare)
public List<SetHeaderDefinition> getHeaders()
public void setHeaders(List<SetHeaderDefinition> headers)
Apache Camel