org.apache.camel.model
Class SplitterType

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

public class SplitterType
extends ExpressionNode

Represents an XML <splitter/> element

Version:
$Revision: 2063 $

Field Summary
 
Fields inherited from class org.apache.camel.model.ProcessorType
DEFAULT_TRACE_CATEGORY
 
Fields inherited from class org.apache.camel.model.OptionalIdentifiedType
nodeCounters
 
Constructor Summary
SplitterType()
           
SplitterType(Expression expression)
           
SplitterType(ExpressionType expression)
           
 
Method Summary
 SplitterType aggregationStrategy(AggregationStrategy aggregationStrategy)
          Set the spliter's aggregationStrategy
 Processor createProcessor(RouteContext routeContext)
           
 SplitterType executor(ThreadPoolExecutor executor)
          Setting the executor for executing the splitting action.
 AggregationStrategy getAggregationStrategy()
           
 String getShortName()
          Returns a short name for this node which can be useful for ID generation or referring to related resources like images
 ThreadPoolExecutor getThreadPoolExecutor()
           
 boolean isParallelProcessing()
           
 boolean isStreaming()
          The splitter should use streaming -- exchanges are being sent as the data for them becomes available.
 SplitterType parallelProcessing()
          Set to run the splitting action parallelly
 SplitterType parallelProcessing(boolean parallelProcessing)
          Set the splitting action's thread model
 void setAggregationStrategy(AggregationStrategy aggregationStrategy)
           
 void setParallelProcessing(boolean parallelProcessing)
           
 void setStreaming(boolean streaming)
           
 void setThreadPoolExecutor(ThreadPoolExecutor threadPoolExecutor)
           
 SplitterType streaming()
          Enables streaming.
 String toString()
           
 
Methods inherited from class org.apache.camel.model.ExpressionNode
configureChild, createFilterProcessor, getExpression, getLabel, getOutputs, setExpression, setOutputs
 
Methods inherited from class org.apache.camel.model.ProcessorType
addInterceptor, addInterceptor, addOutput, addRoutes, aggregator, aggregator, aggregator, aggregator, aggregator, bean, bean, bean, bean, beanRef, beanRef, choice, clearOutput, convertBodyTo, convertBodyTo, convertFaultBodyTo, convertOutBodyTo, createCompositeProcessor, createErrorHandlerBuilder, createOutputsProcessor, createOutputsProcessor, delayer, delayer, delayer, delayer, end, errorHandler, exception, filter, filter, filter, filter, getErrorHandlerBuilder, getErrorHandlerRef, getInheritErrorHandlerFlag, getNodeFactory, getParent, handleFault, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, inOut, intercept, intercept, intercept, intercept, interceptor, interceptors, isInheritErrorHandler, isInheritErrorHandler, loadBalance, loop, loop, loop, makeProcessor, marshal, marshal, marshal, marshal, multicast, multicast, multicast, onException, pipeline, pipeline, pipeline, policies, policy, popBlock, proceed, process, processRef, pushBlock, recipientList, recipientList, removeFaultHeader, removeHeader, removeProperty, resequencer, resequencer, resequencer, resequencer, routingSlip, routingSlip, routingSlip, setBody, setBody, setErrorHandlerBuilder, setErrorHandlerBuilderIfNull, setErrorHandlerRef, setExchangePattern, setFaultBody, setFaultHeader, setHeader, setHeader, setHeader, setInheritErrorHandlerFlag, setNodeFactory, setOutBody, setOutBody, setOutHeader, setOutHeader, setParent, setProperty, setProperty, splitter, splitter, splitter, splitter, splitter, splitter, splitter, splitter, splitter, splitter, splitter, splitter, stop, thread, thread, throttler, throwFault, throwFault, to, to, to, to, to, to, to, to, to, to, trace, trace, transform, transform, tryBlock, unmarshal, unmarshal, unmarshal, unmarshal, wrapInErrorHandler, wrapProcessor, wrapProcessorInInterceptors
 
Methods inherited from class org.apache.camel.model.OptionalIdentifiedType
createId, describe, description, description, getDescription, getId, getNodeCounter, id, idOrCreate, setDescription, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SplitterType

public SplitterType()

SplitterType

public SplitterType(Expression expression)

SplitterType

public SplitterType(ExpressionType 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 ProcessorType<ProcessorType>
Throws:
Exception

aggregationStrategy

public SplitterType aggregationStrategy(AggregationStrategy aggregationStrategy)
Set the spliter's aggregationStrategy

Parameters:
aggregationStrategy -
Returns:
the builder

parallelProcessing

public SplitterType parallelProcessing()
Set to run the splitting action parallelly

Returns:
the builder

parallelProcessing

public SplitterType 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 SplitterType streaming()
Enables streaming. See setStreaming(boolean) for more information

Returns:
the builder

executor

public SplitterType executor(ThreadPoolExecutor executor)
Setting the executor for executing the splitting action.

Parameters:
executor - , it should be a instance of ThreadPoolExcutor NOTE in Camel 2.0 , it will change to use the instance which implements Executor interface
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 Splitter.SPLIT_SIZE header property

Returns:
whether or not streaming should be used

setStreaming

public void setStreaming(boolean streaming)

getThreadPoolExecutor

public ThreadPoolExecutor getThreadPoolExecutor()

setThreadPoolExecutor

public void setThreadPoolExecutor(ThreadPoolExecutor threadPoolExecutor)


Copyright © 2010 IONA Open Source Community. All Rights Reserved.