@Metadata(label="eip,endpoint,routing") public class WireTapDefinition<Type extends ProcessorDefinition<Type>> extends ToDynamicDefinition implements ExecutorServiceAwareDefinition<WireTapDefinition<Type>>
endpointProducerBuilder
inheritErrorHandler, log
Constructor and Description |
---|
WireTapDefinition() |
Modifier and Type | Method and Description |
---|---|
void |
addOutput(ProcessorDefinition<?> output)
Adds the given definition as output to this block
|
WireTapDefinition<Type> |
cacheSize(int cacheSize)
Sets the maximum size used by the
ProducerCache which is used to cache and reuse
producers, when uris are reused. |
WireTapDefinition<Type> |
cacheSize(String cacheSize)
Sets the maximum size used by the
ProducerCache which is used to cache and reuse
producers, when uris are reused. |
WireTapDefinition<Type> |
copy()
Uses a copy of the original exchange
|
WireTapDefinition<Type> |
copy(boolean copy)
Uses a copy of the original exchange
|
WireTapDefinition<Type> |
copy(String copy)
Uses a copy of the original exchange
|
WireTapDefinition<Type> |
dynamicUri(boolean dynamicUri)
Whether the uri is dynamic or static.
|
WireTapDefinition<Type> |
dynamicUri(String dynamicUri)
Whether the uri is dynamic or static.
|
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
|
String |
getCopy() |
String |
getDynamicUri() |
ExecutorService |
getExecutorService() |
String |
getExecutorServiceRef() |
List<SetHeaderDefinition> |
getHeaders() |
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node
|
ExpressionSubElementDefinition |
getNewExchangeExpression() |
org.apache.camel.Processor |
getNewExchangeProcessor() |
String |
getNewExchangeProcessorRef() |
org.apache.camel.Processor |
getOnPrepare() |
String |
getOnPrepareRef() |
String |
getPattern() |
String |
getShortName() |
String |
getUri() |
WireTapDefinition<Type> |
ignoreInvalidEndpoint()
Ignore the invalidate endpoint exception when try to create a producer with that endpoint
|
WireTapDefinition<Type> |
newExchange(org.apache.camel.Processor processor)
Sends a new Exchange, instead of tapping an existing, using
ExchangePattern.InOnly |
WireTapDefinition<Type> |
newExchangeBody(org.apache.camel.Expression expression)
Sends a new Exchange, instead of tapping an existing, using
ExchangePattern.InOnly |
WireTapDefinition<Type> |
newExchangeHeader(String headerName,
org.apache.camel.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(org.apache.camel.Processor onPrepare)
Uses the
Processor when preparing the Exchange to be send. |
WireTapDefinition<Type> |
onPrepareRef(String onPrepareRef)
Uses the
Processor when preparing the Exchange to be send. |
void |
setCopy(String copy) |
void |
setDynamicUri(String dynamicUri) |
void |
setExecutorService(ExecutorService executorService) |
void |
setExecutorServiceRef(String executorServiceRef) |
void |
setHeaders(List<SetHeaderDefinition> headers) |
void |
setNewExchangeExpression(ExpressionSubElementDefinition newExchangeExpression)
Uses the expression for creating a new body as the message to use for wire tapping
|
void |
setNewExchangeProcessor(org.apache.camel.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(org.apache.camel.Processor onPrepare) |
void |
setOnPrepareRef(String onPrepareRef) |
void |
setUri(String uri)
The uri of the endpoint to wiretap to.
|
String |
toString() |
allowOptimisedComponents, allowOptimisedComponents, autoStartComponents, getAllowOptimisedComponents, getAutoStartComponents, getCacheSize, getEndpointProducerBuilder, getIgnoreInvalidEndpoint, ignoreInvalidEndpoint, ignoreInvalidEndpoint, pattern, pattern, setAllowOptimisedComponents, setAutoStartComponents, setCacheSize, setEndpointProducerBuilder, setIgnoreInvalidEndpoint, setPattern, uri, uri
getOutputs
addInterceptStrategy, aggregate, aggregate, aggregate, aggregate, bean, bean, bean, bean, bean, bean, bean, bean, bean, bean, bean, choice, circuitBreaker, claimCheck, claimCheck, claimCheck, claimCheck, clearOutput, configureChild, convertBodyTo, convertBodyTo, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, endChoice, endCircuitBreaker, endDoTry, endParent, endRest, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, filter, filter, filter, filter, getIndex, getInterceptStrategies, getParent, id, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, isAbstract, isInheritErrorHandler, isTopLevelOnly, isWrappingEntireOutput, kamelet, loadBalance, loadBalance, log, log, log, log, log, log, loop, loop, loop, loopDoWhile, loopDoWhile, markRollbackOnly, markRollbackOnlyLast, marshal, marshal, marshal, marshal, multicast, multicast, multicast, onCompletion, onException, onException, pipeline, pipeline, pipeline, pipeline, policy, policy, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, preCreateProcessor, process, process, process, recipientList, recipientList, recipientList, recipientList, removeHeader, removeHeaders, removeHeaders, removeProperties, removeProperties, removeProperty, resequence, resequence, rollback, rollback, routeDescription, routeGroup, routeId, routingSlip, routingSlip, routingSlip, saga, sample, sample, sample, sample, script, script, serviceCall, serviceCall, serviceCall, setBody, setBody, setBody, setExchangePattern, setHeader, setHeader, setHeader, setInheritErrorHandler, setParent, setProperty, setProperty, setProperty, sort, sort, sort, split, split, split, split, startupOrder, step, step, stop, threads, threads, threads, threads, throttle, throttle, throttle, throttle, throttle, throwException, throwException, to, to, to, to, to, to, to, to, to, to, to, to, to, to, toD, toD, toD, toD, toD, toD, toD, toF, transacted, transacted, transform, transform, unmarshal, unmarshal, unmarshal, unmarshal, validate, validate, validate, wireTap, wireTap, wireTap
description, description, getCustomId, getDescription, getDescriptionText, getId, hasCustomIdAssigned, idOrCreate, setCustomId, setDescription, setGeneratedId, setId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
executorService
public String getPattern()
getPattern
in class ToDynamicDefinition
public String toString()
toString
in class ToDynamicDefinition
public String getShortName()
getShortName
in interface org.apache.camel.NamedNode
getShortName
in class ToDynamicDefinition
public String getLabel()
ProcessorDefinition
getLabel
in interface org.apache.camel.NamedNode
getLabel
in class ToDynamicDefinition
public Type end()
ProcessorDefinition
end
in class ProcessorDefinition<ToDynamicDefinition>
public void addOutput(ProcessorDefinition<?> output)
Block
addOutput
in interface Block
addOutput
in class ProcessorDefinition<ToDynamicDefinition>
output
- the processor definitionpublic 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
exchangepublic WireTapDefinition<Type> copy(String copy)
copy
- if it is true camel will copy the original exchange, if it is false camel will not copy the original
exchangepublic WireTapDefinition<Type> dynamicUri(boolean dynamicUri)
dynamicUri
- whether to use dynamic or static urispublic WireTapDefinition<Type> dynamicUri(String dynamicUri)
dynamicUri
- whether to use dynamic or static urispublic WireTapDefinition<Type> newExchangeBody(org.apache.camel.Expression expression)
ExchangePattern.InOnly
expression
- expression that creates the new body to sendnewExchangeHeader(String, org.apache.camel.Expression)
public WireTapDefinition<Type> newExchangeRef(String ref)
ExchangePattern.InOnly
ref
- reference to the Processor
to lookup in the Registry
to be used
for preparing the new exchange to sendpublic WireTapDefinition<Type> newExchange(org.apache.camel.Processor processor)
ExchangePattern.InOnly
processor
- processor preparing the new exchange to sendnewExchangeHeader(String, org.apache.camel.Expression)
public WireTapDefinition<Type> newExchangeHeader(String headerName, org.apache.camel.Expression expression)
ExchangePattern.InOnly
.
Use this together with the newExchangeBody(org.apache.camel.Expression)
or
newExchange(org.apache.camel.Processor)
methods.headerName
- the header nameexpression
- the expression setting the header valuepublic WireTapDefinition<Type> onPrepare(org.apache.camel.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 Registry
public WireTapDefinition<Type> cacheSize(int cacheSize)
ProducerCache
which is used to cache and reuse
producers, when uris are reused.
Beware that when using dynamic endpoints then it affects how well the cache can be utilized. If each dynamic
endpoint is unique then its best to turn of caching by setting this to -1, which allows Camel to not cache both
the producers and endpoints; they are regarded as prototype scoped and will be stopped and discarded after use.
This reduces memory usage as otherwise producers/endpoints are stored in memory in the caches.
However if there are a high degree of dynamic endpoints that have been used before, then it can benefit to use
the cache to reuse both producers and endpoints and therefore the cache size can be set accordingly or rely on
the default size (1000).
If there is a mix of unique and used before dynamic endpoints, then setting a reasonable cache size can help
reduce memory usage to avoid storing too many non frequent used producers.cacheSize
in class ToDynamicDefinition
cacheSize
- the cache size, use 0 for default cache size, or -1 to turn cache off.public WireTapDefinition<Type> cacheSize(String cacheSize)
ProducerCache
which is used to cache and reuse
producers, when uris are reused.
Beware that when using dynamic endpoints then it affects how well the cache can be utilized. If each dynamic
endpoint is unique then its best to turn of caching by setting this to -1, which allows Camel to not cache both
the producers and endpoints; they are regarded as prototype scoped and will be stopped and discarded after use.
This reduces memory usage as otherwise producers/endpoints are stored in memory in the caches.
However if there are a high degree of dynamic endpoints that have been used before, then it can benefit to use
the cache to reuse both producers and endpoints and therefore the cache size can be set accordingly or rely on
the default size (1000).
If there is a mix of unique and used before dynamic endpoints, then setting a reasonable cache size can help
reduce memory usage to avoid storing too many non frequent used producers.cacheSize
in class ToDynamicDefinition
cacheSize
- the cache size, use 0 for default cache size, or -1 to turn cache off.public WireTapDefinition<Type> ignoreInvalidEndpoint()
public String getUri()
getUri
in class ToDynamicDefinition
public void setUri(String uri)
org.apache.camel.language.simple.SimpleLanguage
expression.setUri
in class ToDynamicDefinition
public org.apache.camel.Processor getNewExchangeProcessor()
public void setNewExchangeProcessor(org.apache.camel.Processor processor)
public String getNewExchangeProcessorRef()
public void setNewExchangeProcessorRef(String ref)
public ExpressionSubElementDefinition getNewExchangeExpression()
public void setNewExchangeExpression(ExpressionSubElementDefinition newExchangeExpression)
public ExecutorService getExecutorService()
getExecutorService
in interface org.apache.camel.ExecutorServiceAware
public void setExecutorService(ExecutorService executorService)
setExecutorService
in interface org.apache.camel.ExecutorServiceAware
public String getExecutorServiceRef()
getExecutorServiceRef
in interface org.apache.camel.ExecutorServiceAware
public void setExecutorServiceRef(String executorServiceRef)
setExecutorServiceRef
in interface org.apache.camel.ExecutorServiceAware
public String getCopy()
public void setCopy(String copy)
public String getDynamicUri()
public void setDynamicUri(String dynamicUri)
public String getOnPrepareRef()
public void setOnPrepareRef(String onPrepareRef)
public org.apache.camel.Processor getOnPrepare()
public void setOnPrepare(org.apache.camel.Processor onPrepare)
public List<SetHeaderDefinition> getHeaders()
public void setHeaders(List<SetHeaderDefinition> headers)
Apache Camel