org.apache.camel.model
Class ResequenceDefinition

java.lang.Object
  extended by org.apache.camel.model.OptionalIdentifiedDefinition<Type>
      extended by org.apache.camel.model.ProcessorDefinition<ProcessorDefinition>
          extended by org.apache.camel.model.ResequenceDefinition
All Implemented Interfaces:
Block

public class ResequenceDefinition
extends ProcessorDefinition<ProcessorDefinition>

Represents an XML <resequence/> element

Version:
$Revision: 801784 $

Field Summary
 
Fields inherited from class org.apache.camel.model.ProcessorDefinition
log
 
Constructor Summary
ResequenceDefinition()
           
ResequenceDefinition(List<Expression> expressions)
           
 
Method Summary
 ResequenceDefinition batch()
          Configures the batch-based resequencing algorithm using the default configuration.
 ResequenceDefinition batch(BatchResequencerConfig config)
          Configures the batch-based resequencing algorithm using the given BatchResequencerConfig.
 ResequenceDefinition capacity(int capacity)
          Sets the capacity for the stream resequencer
 ResequenceDefinition comparator(ExpressionResultComparator comparator)
          Sets the comparator to use for stream resequencer
protected  Resequencer createBatchResequencer(RouteContext routeContext, BatchResequencerConfig config)
          Creates a batch Resequencer instance applying the given config.
 Processor createProcessor(RouteContext routeContext)
           
protected  StreamResequencer createStreamResequencer(RouteContext routeContext, StreamResequencerConfig config)
          Creates a StreamResequencer instance applying the given config.
 ResequenceDefinition expression(ExpressionDefinition expression)
          Sets the expression to use for reordering
 BatchResequencerConfig getBatchConfig()
           
 BatchResequencerConfig getBatchConfig(BatchResequencerConfig defaultConfig)
           
 List<Expression> getExpressionList()
           
 List<ExpressionDefinition> getExpressions()
           
 String getLabel()
          Returns a label to describe this node such as the expression if some kind of expression node
 List<ProcessorDefinition> getOutputs()
           
 String getShortName()
          Returns a short name for this node which can be useful for ID generation or referring to related resources like images
 StreamResequencerConfig getStreamConfig()
           
 void setBatchConfig(BatchResequencerConfig batchConfig)
           
 void setOutputs(List<ProcessorDefinition> outputs)
           
 void setStreamConfig(StreamResequencerConfig streamConfig)
           
 ResequenceDefinition size(int batchSize)
          Sets the in batch size for number of exchanges received
 ResequenceDefinition stream()
          Configures the stream-based resequencing algorithm using the default configuration.
 ResequenceDefinition stream(StreamResequencerConfig config)
          Configures the stream-based resequencing algorithm using the given StreamResequencerConfig.
 ResequenceDefinition timeout(long timeout)
          Sets the timeout
 String toString()
           
 
Methods inherited from class org.apache.camel.model.ProcessorDefinition
addInterceptStrategies, 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.OptionalIdentifiedDefinition
description, getDescription, getId, hasCustomIdAssigned, idOrCreate, setDescription, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResequenceDefinition

public ResequenceDefinition()

ResequenceDefinition

public ResequenceDefinition(List<Expression> expressions)
Method Detail

getShortName

public String getShortName()
Description copied from class: OptionalIdentifiedDefinition
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 OptionalIdentifiedDefinition<ProcessorDefinition>
Returns:
defaults to "node" but derived nodes should overload this to provide a unique name

stream

public ResequenceDefinition stream()
Configures the stream-based resequencing algorithm using the default configuration.

Returns:
the builder

batch

public ResequenceDefinition batch()
Configures the batch-based resequencing algorithm using the default configuration.

Returns:
the builder

stream

public ResequenceDefinition stream(StreamResequencerConfig config)
Configures the stream-based resequencing algorithm using the given StreamResequencerConfig.

Parameters:
config - the config
Returns:
the builder

batch

public ResequenceDefinition batch(BatchResequencerConfig config)
Configures the batch-based resequencing algorithm using the given BatchResequencerConfig.

Parameters:
config - the config
Returns:
the builder

expression

public ResequenceDefinition expression(ExpressionDefinition expression)
Sets the expression to use for reordering

Parameters:
expression - the expression
Returns:
the builder

timeout

public ResequenceDefinition timeout(long timeout)
Sets the timeout

Parameters:
timeout - timeout in millis
Returns:
the builder

size

public ResequenceDefinition size(int batchSize)
Sets the in batch size for number of exchanges received

Parameters:
batchSize - the batch size
Returns:
the builder

capacity

public ResequenceDefinition capacity(int capacity)
Sets the capacity for the stream resequencer

Parameters:
capacity - the capacity
Returns:
the builder

comparator

public ResequenceDefinition comparator(ExpressionResultComparator comparator)
Sets the comparator to use for stream resequencer

Parameters:
comparator - the comparator
Returns:
the builder

toString

public String toString()
Overrides:
toString in class Object

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<ProcessorDefinition>

getExpressions

public List<ExpressionDefinition> getExpressions()

getExpressionList

public List<Expression> getExpressionList()

getOutputs

public List<ProcessorDefinition> getOutputs()
Specified by:
getOutputs in class ProcessorDefinition<ProcessorDefinition>

setOutputs

public void setOutputs(List<ProcessorDefinition> outputs)

getBatchConfig

public BatchResequencerConfig getBatchConfig()

getBatchConfig

public BatchResequencerConfig getBatchConfig(BatchResequencerConfig defaultConfig)

getStreamConfig

public StreamResequencerConfig getStreamConfig()

setBatchConfig

public void setBatchConfig(BatchResequencerConfig batchConfig)

setStreamConfig

public void setStreamConfig(StreamResequencerConfig streamConfig)

createProcessor

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

createBatchResequencer

protected Resequencer createBatchResequencer(RouteContext routeContext,
                                             BatchResequencerConfig config)
                                      throws Exception
Creates a batch Resequencer instance applying the given config.

Parameters:
routeContext - route context.
config - batch resequencer configuration.
Returns:
the configured batch resequencer.
Throws:
Exception - can be thrown

createStreamResequencer

protected StreamResequencer createStreamResequencer(RouteContext routeContext,
                                                    StreamResequencerConfig config)
                                             throws Exception
Creates a StreamResequencer instance applying the given config.

Parameters:
routeContext - route context.
config - stream resequencer configuration.
Returns:
the configured stream resequencer.
Throws:
Exception - can be thrwon


Apache CAMEL