Package org.apache.camel.model
Class InterceptSendToEndpointDefinition
- java.lang.Object
-
- org.apache.camel.model.OptionalIdentifiedDefinition<Type>
-
- org.apache.camel.model.ProcessorDefinition<Type>
-
- org.apache.camel.model.OutputDefinition<InterceptSendToEndpointDefinition>
-
- org.apache.camel.model.InterceptSendToEndpointDefinition
-
- All Implemented Interfaces:
org.apache.camel.CamelContextAware,org.apache.camel.LineNumberAware,Block,OutputNode,org.apache.camel.NamedNode,org.apache.camel.spi.HasId,org.apache.camel.spi.IdAware
@Metadata(label="configuration") public class InterceptSendToEndpointDefinition extends OutputDefinition<InterceptSendToEndpointDefinition>
Intercepts messages being sent to an endpoint
-
-
Field Summary
-
Fields inherited from class org.apache.camel.model.OutputDefinition
outputs
-
Fields inherited from class org.apache.camel.model.ProcessorDefinition
inheritErrorHandler
-
-
Constructor Summary
Constructors Constructor Description InterceptSendToEndpointDefinition()InterceptSendToEndpointDefinition(String uri)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidafterPropertiesSet()This method is only for handling some post configuration that is needed since this is an interceptor, and we have to do a bit of magic logic to fixup to handle predicates with or without proceed/stop set as well.InterceptSendToEndpointDefinitionafterUri(String uri)After sending to the endpoint then send the message to this url which allows to process its result.InterceptSendToEndpointDefinitionafterUrl(String url)Deprecated.useafterUri(String)StringgetAfterUri()StringgetLabel()Returns a label to describe this node such as the expression if some kind of expression nodeList<ProcessorDefinition<?>>getOutputs()StringgetShortName()StringgetSkipSendToOriginalEndpoint()StringgetUri()booleanisAbstract()Whether this model is abstract or not.booleanisTopLevelOnly()Whether this definition can only be added as top-level directly on the route itself (such as onException,onCompletion,intercept, etc.)voidsetAfterUri(String afterProcessor)After sending to the endpoint then send the message to this uri which allows to process its result.voidsetOutputs(List<ProcessorDefinition<?>> outputs)voidsetSkipSendToOriginalEndpoint(String skipSendToOriginalEndpoint)If set to true then the message is not sent to the original endpoint.voidsetUri(String uri)Intercept sending to the uri or uri pattern.InterceptSendToEndpointDefinitionskipSendToOriginalEndpoint()Skip sending theExchangeto the original intended endpointStringtoString()InterceptSendToEndpointDefinitionwhen(org.apache.camel.Predicate predicate)Applies this interceptor only if the given predicate is true-
Methods inherited from class org.apache.camel.model.ProcessorDefinition
addInterceptStrategy, addOutput, 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, convertBodyTo, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, end, endChoice, endCircuitBreaker, endDoCatch, endDoTry, endParent, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, filter, filter, filter, filter, getIndex, getInterceptStrategies, getParent, getRouteConfiguration, id, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, isInheritErrorHandler, 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, pausable, pausable, pausable, pausable, 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, resumable, resumable, resumable, rollback, rollback, routeDescription, routeGroup, routeId, routingSlip, routingSlip, routingSlip, saga, sample, sample, sample, sample, sample, script, script, serviceCall, serviceCall, serviceCall, setBody, setBody, setBody, setExchangePattern, setExchangePattern, setHeader, setHeader, setHeader, setInheritErrorHandler, setParent, setProperty, setProperty, setProperty, setRouteConfiguration, 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, unmarshal, unmarshal, unmarshal, validate, validate, validate, wireTap, wireTap, wireTap
-
Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition
description, description, getCamelContext, getCustomId, getDescription, getDescriptionText, getId, getLineNumber, getLocation, hasCustomIdAssigned, idOrCreate, setCamelContext, setCustomId, setDescription, setGeneratedId, setId, setLineNumber, setLocation
-
-
-
-
Constructor Detail
-
InterceptSendToEndpointDefinition
public InterceptSendToEndpointDefinition()
-
InterceptSendToEndpointDefinition
public InterceptSendToEndpointDefinition(String uri)
-
-
Method Detail
-
getOutputs
public List<ProcessorDefinition<?>> getOutputs()
- Overrides:
getOutputsin classOutputDefinition<InterceptSendToEndpointDefinition>
-
setOutputs
public void setOutputs(List<ProcessorDefinition<?>> outputs)
- Overrides:
setOutputsin classOutputDefinition<InterceptSendToEndpointDefinition>
-
toString
public String toString()
- Overrides:
toStringin classOutputDefinition<InterceptSendToEndpointDefinition>
-
getShortName
public String getShortName()
- Specified by:
getShortNamein interfaceorg.apache.camel.NamedNode- Overrides:
getShortNamein classOutputDefinition<InterceptSendToEndpointDefinition>
-
getLabel
public String getLabel()
Description copied from class:ProcessorDefinitionReturns a label to describe this node such as the expression if some kind of expression node- Specified by:
getLabelin interfaceorg.apache.camel.NamedNode- Overrides:
getLabelin classProcessorDefinition<InterceptSendToEndpointDefinition>
-
isAbstract
public boolean isAbstract()
Description copied from class:ProcessorDefinitionWhether this model is abstract or not. An abstract model is something that is used for configuring cross cutting concerns such as error handling, transaction policies, interceptors etc. Regular definitions is what is part of the route, such as ToDefinition, WireTapDefinition and the likes. Will by default return false to indicate regular definition, so all the abstract definitions must override this method and return true instead. This information is used in camel-spring to let Camel work a bit on the model provided by JAXB from the Spring XML file. This is needed to handle those cross cutting concerns properly. The Java DSL does not have this issue as it can work this out directly using the fluent builder methods.- Overrides:
isAbstractin classProcessorDefinition<InterceptSendToEndpointDefinition>- Returns:
- true for abstract, otherwise false for regular.
-
isTopLevelOnly
public boolean isTopLevelOnly()
Description copied from class:ProcessorDefinitionWhether this definition can only be added as top-level directly on the route itself (such as onException,onCompletion,intercept, etc.) If trying to add a top-level only definition to a nested output would fail in theProcessorDefinition.addOutput(ProcessorDefinition)method.- Overrides:
isTopLevelOnlyin classProcessorDefinition<InterceptSendToEndpointDefinition>
-
when
public InterceptSendToEndpointDefinition when(@AsPredicate org.apache.camel.Predicate predicate)
Applies this interceptor only if the given predicate is true- Parameters:
predicate- the predicate- Returns:
- the builder
-
skipSendToOriginalEndpoint
public InterceptSendToEndpointDefinition skipSendToOriginalEndpoint()
Skip sending theExchangeto the original intended endpoint- Returns:
- the builder
-
afterUrl
@Deprecated public InterceptSendToEndpointDefinition afterUrl(String url)
Deprecated.useafterUri(String)After sending to the endpoint then send the message to this url which allows to process its result.- Returns:
- the builder
-
afterUri
public InterceptSendToEndpointDefinition afterUri(String uri)
After sending to the endpoint then send the message to this url which allows to process its result.- Returns:
- the builder
-
afterPropertiesSet
public void afterPropertiesSet()
This method is only for handling some post configuration that is needed since this is an interceptor, and we have to do a bit of magic logic to fixup to handle predicates with or without proceed/stop set as well.
-
getSkipSendToOriginalEndpoint
public String getSkipSendToOriginalEndpoint()
-
setSkipSendToOriginalEndpoint
public void setSkipSendToOriginalEndpoint(String skipSendToOriginalEndpoint)
If set to true then the message is not sent to the original endpoint. By default (false) the message is both intercepted and then sent to the original endpoint.
-
getUri
public String getUri()
-
setUri
public void setUri(String uri)
Intercept sending to the uri or uri pattern.
-
getAfterUri
public String getAfterUri()
-
setAfterUri
public void setAfterUri(String afterProcessor)
After sending to the endpoint then send the message to this uri which allows to process its result.
-
-