Class IsXmlPipe

All Implemented Interfaces:
FrankElement, HasApplicationContext, HasName, HasTransactionAttribute, IConfigurable, IForwardTarget, IPipe, IScopeProvider, IWithParameters, NameAware, EventThrowing, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle

@Forward(name="*", description="when {@literal thenForwardName} or {@literal elseForwardName} are used") @EnterpriseIntegrationPattern(ROUTER) public class IsXmlPipe extends AbstractPipe
Selects an exitState, based on whether the input is an XML string. The input is an XML string if it, after removing leading white-space characters, starts with '<'.
Since:
4.3
Author:
Peter Leeuwenburgh
  • Constructor Details

    • IsXmlPipe

      public IsXmlPipe()
  • Method Details

    • doPipe

      public PipeRunResult doPipe(Message message, PipeLineSession session) throws PipeRunException
      Description copied from interface: IPipe
      This is where the action takes place. Pipes may only throw a PipeRunException, to be handled by the caller of this object. Implementations must either consume the message, or pass it on to the next Pipe in the PipeRunResult.
      Throws:
      PipeRunException
    • setThenForwardName

      public void setThenForwardName(String thenForwardName)
      Forward returned when true.
      Default value
      then
    • getThenForwardName

      public String getThenForwardName()
    • setElseForwardName

      public void setElseForwardName(String elseForwardName)
      Forward returned when 'false'.
      Default value
      else
    • getElseForwardName

      public String getElseForwardName()
    • isElseForwardOnEmptyInput

      public boolean isElseForwardOnEmptyInput()
    • setElseForwardOnEmptyInput

      public void setElseForwardOnEmptyInput(boolean b)
      Returns elseforward when the input is empty (or thenforward).
      Default value
      true