Class TimeoutGuardPipe

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
Direct Known Subclasses:
DirectWrapperPipe, GetTibcoQueues, SendTibcoMessage

public abstract class TimeoutGuardPipe extends FixedForwardPipe
Extension to FixedForwardPipe for interrupting processing when timeout is exceeded.
Author:
Peter Leeuwenburgh
Specific parameters
timeout When a parameter with name timeout is present, it is used instead of the timeout specified by the attribute
  • Constructor Details

    • TimeoutGuardPipe

      public TimeoutGuardPipe()
  • 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
    • doPipeWithTimeoutGuarded

      public abstract PipeRunResult doPipeWithTimeoutGuarded(Message input, PipeLineSession session) throws PipeRunException
      doPipe wrapped around a TimeoutGuard
      Throws:
      PipeRunException
    • killPipe

      protected void killPipe()
      optional implementation to kill additional threads if the pipe may have created those.
    • setThrowException

      public void setThrowException(boolean b)
      If true, a piperunexception is thrown. otherwise the output is only logged as an error (and returned in a xml string with 'error' tags)
      Default value
      true
    • isThrowException

      public boolean isThrowException()
    • getTimeout

      public int getTimeout()
    • setTimeout

      public void setTimeout(int i)
      timeout in seconds of obtaining a result
      Default value
      30