org.apache.camel.model
Class SplitDefinition

java.lang.Object
  extended by org.apache.camel.model.OptionalIdentifiedType<Type>
      extended by org.apache.camel.model.ProcessorDefinition<ProcessorDefinition>
          extended by org.apache.camel.model.ExpressionNode
              extended by org.apache.camel.model.SplitDefinition
All Implemented Interfaces:
Block

public class SplitDefinition
extends ExpressionNode

Represents an XML <split/> element

Version:
$Revision: 772172 $

Field Summary
 
Fields inherited from class org.apache.camel.model.OptionalIdentifiedType
nodeCounters
 
Constructor Summary
SplitDefinition()
           
SplitDefinition(Expression expression)
           
SplitDefinition(ExpressionDefinition expression)
           
 
Method Summary
 SplitDefinition aggregationStrategy(AggregationStrategy aggregationStrategy)
          Set the aggregationStrategy
 Processor createProcessor(RouteContext routeContext)
           
 SplitDefinition executorService(ExecutorService executorService)
          Setting the executor service for executing the splitting action.
 ExpressionClause<SplitDefinition> expression()
          Set the expression that the splitter will use
 AggregationStrategy getAggregationStrategy()
           
 ExecutorService getExecutorService()
           
 String getShortName()
          Returns a short name for this node which can be useful for ID generation or referring to related resources like images
 boolean isParallelProcessing()
           
 boolean isStreaming()
          The splitter should use streaming -- exchanges are being sent as the data for them becomes available.
 SplitDefinition parallelProcessing()
          Doing the splitting work in parallel
 SplitDefinition parallelProcessing(boolean parallelProcessing)
          Set the splitting action's thread model
 void setAggregationStrategy(AggregationStrategy aggregationStrategy)
           
 void setExecutorService(ExecutorService executorService)
           
 void setParallelProcessing(boolean parallelProcessing)
           
 void setStreaming(boolean streaming)
           
 SplitDefinition streaming()
          Enables streaming.
 String toString()
           
 
Methods inherited from class org.apache.camel.model.ExpressionNode
createFilterProcessor, getExpression, getLabel, getOutputs, setExpression, setOutputs
 
Methods inherited from class org.apache.camel.model.ProcessorDefinition
addInterceptStrategy, addOutput, addRoutes, aggregate, aggregate, aggregate, aggregate, aggregate, aop, bean, bean, bean, bean, beanRef, beanRef, choice, clearOutput, configureChild, convertBodyTo, convertBodyTo, createChannel, createCompositeProcessor, createErrorHandlerBuilder, createOutputsProcessor, createOutputsProcessor, delay, delay, delay, doTry, end, enrich, enrich, errorHandler, filter, filter, filter, filter, getErrorHandlerBuilder, getErrorHandlerRef, getInterceptStrategies, getNodeFactory, getParent, id, idempotentConsumer, idempotentConsumer, idempotentConsumer, inOnly, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, inOut, loadBalance, loadBalance, loop, loop, loop, makeProcessor, marshal, marshal, marshal, marshal, multicast, multicast, multicast, onCompletion, onException, pipeline, pipeline, pipeline, policy, policy, pollEnrich, pollEnrich, pollEnrich, pollEnrich, process, processRef, recipientList, recipientList, removeFaultHeader, removeHeader, removeProperty, resequence, resequence, resequence, resequencer, rollback, rollback, routingSlip, routingSlip, setBody, setBody, setErrorHandlerBuilder, setErrorHandlerBuilderIfNull, setErrorHandlerRef, setExchangePattern, setFaultBody, setFaultHeader, setHeader, setHeader, setNodeFactory, setOutHeader, setOutHeader, setParent, setProperty, setProperty, sort, sort, sortBody, sortBody, split, split, split, stop, threads, threads, throttle, throwException, to, to, to, to, to, to, to, to, to, to, toF, transacted, transacted, transform, transform, unmarshal, unmarshal, unmarshal, unmarshal, wireTap, wireTap, wireTap, wrapChannel, wrapProcessor
 
Methods inherited from class org.apache.camel.model.OptionalIdentifiedType
createId, description, getDescription, getId, getNodeCounter, hasCustomIdAssigned, idOrCreate, setDescription, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SplitDefinition

public SplitDefinition()

SplitDefinition

public SplitDefinition(Expression expression)

SplitDefinition

public SplitDefinition(ExpressionDefinition expression)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getShortName

public String getShortName()
Description copied from class: OptionalIdentifiedType
Returns a short name for this node which can be useful for ID generation or referring to related resources like images

Overrides:
getShortName in class ExpressionNode
Returns:
defaults to "node" but derived nodes should overload this to provide a unique name

createProcessor

public Processor createProcessor(RouteContext routeContext)
                          throws Exception
Overrides:
createProcessor in class ProcessorDefinition<ProcessorDefinition>
Throws:
Exception

expression

public ExpressionClause<SplitDefinition> expression()
Set the expression that the splitter will use

Returns:
the builder

aggregationStrategy

public SplitDefinition aggregationStrategy(AggregationStrategy aggregationStrategy)
Set the aggregationStrategy

Returns:
the builder

parallelProcessing

public SplitDefinition parallelProcessing()
Doing the splitting work in parallel

Returns:
the builder

parallelProcessing

public SplitDefinition parallelProcessing(boolean parallelProcessing)
Set the splitting action's thread model

Parameters:
parallelProcessing - true to use a thread pool, if false then work is done in the calling thread.
Returns:
the builder

streaming

public SplitDefinition streaming()
Enables streaming. See setStreaming(boolean) for more information

Returns:
the builder

executorService

public SplitDefinition executorService(ExecutorService executorService)
Setting the executor service for executing the splitting action.

Parameters:
executorService - the executor service
Returns:
the builder

getAggregationStrategy

public AggregationStrategy getAggregationStrategy()

setAggregationStrategy

public void setAggregationStrategy(AggregationStrategy aggregationStrategy)

isParallelProcessing

public boolean isParallelProcessing()

setParallelProcessing

public void setParallelProcessing(boolean parallelProcessing)

isStreaming

public boolean isStreaming()
The splitter should use streaming -- exchanges are being sent as the data for them becomes available. This improves throughput and memory usage, but it has a drawback: - the sent exchanges will no longer contain the Exchange.SPLIT_SIZE header property

Returns:
whether or not streaming should be used

setStreaming

public void setStreaming(boolean streaming)

getExecutorService

public ExecutorService getExecutorService()

setExecutorService

public void setExecutorService(ExecutorService executorService)


Apache CAMEL