org.apache.camel.model
Class SendDefinition<Type extends ProcessorDefinition<Type>>

java.lang.Object
  extended by org.apache.camel.model.OptionalIdentifiedDefinition<Type>
      extended by org.apache.camel.model.ProcessorDefinition<Type>
          extended by org.apache.camel.model.NoOutputDefinition<Type>
              extended by org.apache.camel.model.SendDefinition<Type>
All Implemented Interfaces:
Block, NamedNode
Direct Known Subclasses:
InOnlyDefinition, InOutDefinition, ToDefinition

public abstract class SendDefinition<Type extends ProcessorDefinition<Type>>
extends NoOutputDefinition<Type>

Base class for sending to an endpoint with an optional ExchangePattern

Version:

Field Summary
protected  Endpoint endpoint
           
protected  String ref
           
protected  String uri
           
 
Fields inherited from class org.apache.camel.model.ProcessorDefinition
inheritErrorHandler, log
 
Constructor Summary
SendDefinition()
           
SendDefinition(String uri)
           
 
Method Summary
 Processor createProcessor(RouteContext routeContext)
          Override this in definition class and implement logic to create the processor based on the definition model.
 Endpoint getEndpoint()
          Gets tne endpoint if an Endpoint instance was set.
 String getLabel()
          Returns a label to describe this node such as the expression if some kind of expression node
 ExchangePattern getPattern()
           
 String getRef()
           
 String getUri()
           
 String getUriOrRef()
          Returns the endpoint URI or the name of the reference to it
 Endpoint resolveEndpoint(RouteContext context)
           
 void setEndpoint(Endpoint endpoint)
           
 void setRef(String ref)
           
 void setUri(String uri)
           
 
Methods inherited from class org.apache.camel.model.NoOutputDefinition
getOutputs, isOutputSupported
 
Methods inherited from class org.apache.camel.model.ProcessorDefinition
addInterceptStrategies, addInterceptStrategy, addOutput, addRoutes, aggregate, aggregate, aggregate, aggregate, aop, attribute, bean, bean, bean, bean, beanRef, beanRef, choice, clearOutput, configureChild, convertBodyTo, convertBodyTo, createChannel, createChildProcessor, createCompositeProcessor, createOutputsProcessor, createOutputsProcessor, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, end, endChoice, endDoTry, endParent, enrich, enrich, enrichRef, filter, filter, filter, filter, getInterceptStrategies, getNodeFactory, getOtherAttributes, getParent, id, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, inOut, isAbstract, isInheritErrorHandler, loadBalance, loadBalance, 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, pollEnrich, pollEnrichRef, preCreateProcessor, process, processRef, recipientList, recipientList, recipientList, recipientList, removeFaultHeader, removeHeader, removeHeaders, removeHeaders, removeProperty, resequence, resequence, resolveKnownConstantFields, resolvePropertyPlaceholders, rollback, rollback, routeId, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, sample, sample, sample, setBody, setBody, setExchangePattern, setFaultBody, setFaultHeader, setHeader, setHeader, setInheritErrorHandler, setNodeFactory, setOtherAttributes, setOutHeader, setOutHeader, setParent, setProperty, setProperty, sort, sort, sort, split, split, split, 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, wrapProcessor
 
Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition
description, getDescription, getDescriptionText, getId, getShortName, hasCustomIdAssigned, idOrCreate, setDescription, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uri

protected String uri

ref

protected String ref

endpoint

protected Endpoint endpoint
Constructor Detail

SendDefinition

public SendDefinition()

SendDefinition

public SendDefinition(String uri)
Method Detail

createProcessor

public Processor createProcessor(RouteContext routeContext)
                          throws Exception
Description copied from class: ProcessorDefinition
Override this in definition class and implement logic to create the processor based on the definition model.

Overrides:
createProcessor in class ProcessorDefinition<Type extends ProcessorDefinition<Type>>
Throws:
Exception

resolveEndpoint

public Endpoint resolveEndpoint(RouteContext context)

getRef

public String getRef()

setRef

public void setRef(String ref)

getUri

public String getUri()

setUri

@Required
public void setUri(String uri)

getEndpoint

public Endpoint getEndpoint()
Gets tne endpoint if an Endpoint instance was set.

This implementation may return null which means you need to use getRef() or getUri() to get information about the endpoint.

Returns:
the endpoint instance, or null

setEndpoint

public void setEndpoint(Endpoint endpoint)

getPattern

public ExchangePattern getPattern()

getUriOrRef

public String getUriOrRef()
Returns the endpoint URI or the name of the reference to it


getLabel

public String getLabel()
Description copied from class: ProcessorDefinition
Returns a label to describe this node such as the expression if some kind of expression node

Overrides:
getLabel in class ProcessorDefinition<Type extends ProcessorDefinition<Type>>


Apache CAMEL