Class SortDefinition<T>

All Implemented Interfaces:
org.apache.camel.CamelContextAware, org.apache.camel.LineNumberAware, Block, HasExpressionType, org.apache.camel.NamedNode, org.apache.camel.spi.HasCamelContext, org.apache.camel.spi.HasId, org.apache.camel.spi.IdAware

@Metadata(label="eip,routing") public class SortDefinition<T> extends ExpressionNode
Sorts the contents of the message
  • Constructor Details

    • SortDefinition

      public SortDefinition()
    • SortDefinition

      public SortDefinition(org.apache.camel.Expression expression)
    • SortDefinition

      public SortDefinition(org.apache.camel.Expression expression, Comparator<? super T> comparator)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getShortName

      public String getShortName()
    • 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
      Specified by:
      getLabel in interface org.apache.camel.NamedNode
      Overrides:
      getLabel in class ExpressionNode
    • setExpression

      public void setExpression(ExpressionDefinition expression)
      Optional expression to sort by something else than the message body
      Overrides:
      setExpression in class ExpressionNode
    • comparator

      public SortDefinition<T> comparator(Comparator<T> comparator)
      Sets the comparator to use for sorting
      Parameters:
      comparator - the comparator to use for sorting
      Returns:
      the builder
    • comparator

      public SortDefinition<T> comparator(String ref)
      Sets a reference to lookup for the comparator to use for sorting
      Parameters:
      ref - reference for the comparator
      Returns:
      the builder
    • getComparatorBean

      public Comparator<? super T> getComparatorBean()
    • getComparator

      public String getComparator()
    • setComparator

      public void setComparator(String comparator)