Class CompositePipe

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

public class CompositePipe extends FixedForwardPipe implements org.springframework.beans.factory.InitializingBean, AdapterAware
Pipe that allows you to call a Frank! Plugin. Just like a FrankSender this pipe calls a sub-process, or sub-adapter. As not all session variables are copied over, if you wish to propagate a value, you can do so by using Parameters. For example:
<CompositePipe name="name-of-the-pipe" plugin="name-of-the-plugin">
    <Param name="inject-me" value="im a value" />
    <Param name="inject-me-too" sessionKey="originalMessage" />
</CompositePipe>
Author:
Niels Meijer
See Also:
  • Constructor Details

  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • configure

      public void configure() throws ConfigurationException
      Description copied from class: FixedForwardPipe
      Checks for correct configuration of forward.
      Specified by:
      configure in interface IConfigurable
      Overrides:
      configure in class FixedForwardPipe
      Throws:
      ConfigurationException - in case it was not able to configure the component.
    • start

      public void start()
      Description copied from interface: IPipe
      Perform necessary action to start the pipe. This method is executed after the IConfigurable.configure() method, for each start and stop command of the adapter.
      Specified by:
      start in interface IPipe
      Specified by:
      start in interface org.springframework.context.Lifecycle
      Overrides:
      start in class AbstractPipe
    • stop

      public void stop()
      Description copied from interface: IPipe
      Perform necessary actions to stop the Pipe.
      For instance, closing JMS connections, DBMS connections etc.
      Specified by:
      stop in interface IPipe
      Specified by:
      stop in interface org.springframework.context.Lifecycle
      Overrides:
      stop in class AbstractPipe
    • doPipe

      public @NonNull PipeRunResult doPipe(Message message, PipeLineSession parentSession) 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.
      Specified by:
      doPipe in interface IPipe
      Throws:
      PipeRunException
    • setPlugin

      public void setPlugin(String pluginName)
      Functional name of the plugin to load.
    • setRef

      @Default("Configuration.xml") public void setRef(String partReference)
      File in the Plugin which contains the <PipelinePart /> to call. Defaults to "Configuration.xml" but can be any XML file.