Interface IPipe

All Superinterfaces:
org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.Aware, IConfigurable, IConfigurationAware, IForwardTarget, INamedObject, IScopeProvider
All Known Subinterfaces:
IDualModeValidator, IValidator, IWrapperPipe, IXmlValidator
All Known Implementing Classes:
AbstractPipe, ApiPrincipalPipe, Base64Pipe, BlobLineIteratingPipe, BytesOutputPipe, ChecksumPipe, ClobLineIteratingPipe, CollectorPipeBase, CompareIntegerPipe, CompareStringPipe, CompressPipe, CounterSwitchPipe, CredentialCheckingPipe, CrlPipe, CsvParserPipe, DelayPipe, DomainTransformerPipe, EchoPipe, EscapePipe, EtagHandlerPipe, ExceptionPipe, FileLineIteratorPipe, FilenameSwitch, FixedForwardPipe, FixedResult, FixedResultPipe, ForEachChildElementPipe, GetFromSession, GetPrincipalPipe, HashPipe, IncreaseIntegerPipe, IsUserInRolePipe, IsXmlPipe, IteratingPipe, JdbcIteratingPipeBase, Json2XmlValidator, JsonPipe, JsonValidator, JsonWellFormedChecker, JsonXsltPipe, JwtPipe, LdapChallengePipe, LdapFindGroupMembershipsPipe, LdapFindMemberPipe, LdapQueryPipeBase, LobLineIteratingPipeBase, LogContextPipe, MailSenderPipe, MessageSendingPipe, PasswordGeneratorPipe, PasswordHashPipe, PGPPipe, PostboxRetrieverPipe, PutInSession, PutParametersInSession, PutSystemDateInSession, RemoveCacheKeyPipe, RemoveFromSession, ReplacerPipe, ResultSetIteratingPipe, SenderPipe, SignaturePipe, SizePipe, SkipPipe, SoapValidator, SoapWrapperPipe, Stream2StringPipe, StreamLineIteratorPipe, StreamPipe, StringIteratorPipe, Text2XmlPipe, TextSplitterPipe, TimeoutGuardPipe, UnzipPipe, UUIDGeneratorPipe, ValidatorBase, ValidatorBase.ResponseValidatorWrapper, WsdlGeneratorPipe, WsdlXmlValidator, XmlBuilderPipe, XmlFileElementIteratorPipe, XmlIf, XmlSwitch, XmlValidator, XmlValidator.ResponseValidatorWrapper, XmlWellFormedChecker, XQueryPipe, XsltPipe, ZipIteratorPipe, ZipWriterPipe

@FrankDocGroup(PIPE) public interface IPipe extends IConfigurable, IForwardTarget
A Pipe represents an action to take in a PipeLine.
Author:
Johan Verrips
Default element
org.frankframework.pipes.SenderPipe
  • Field Details

  • Method Details

    • configure

      void configure() throws ConfigurationException
      configure() is called once after the PipeLine is registered at the Adapter. Purpose of this method is to reduce creating connections to databases etc. in the doPipe() method. As much as possible class-instantiating should take place in the configure() method, to improve performance.
      Specified by:
      configure in interface IConfigurable
      Throws:
      ConfigurationException
    • doPipe

      PipeRunResult doPipe(Message message, PipeLineSession session) throws PipeRunException
      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. If the result of the Pipe does not depend on the input, like for the FixedResultPipe, the Pipe can schedule the input to be closed at session exit, by calling Message.closeOnCloseOf(PipeLineSession, String) This allows the previous Pipe to release any resources (e.g. connections) that it might have kept open until the message was consumed. Doing so avoids connections leaking from pools, while it enables efficient streaming processing of data while it is being read from a stream.
      Throws:
      PipeRunException
    • getMaxThreads

      int getMaxThreads()
      Indicates the maximum number of threads that may call doPipe() simultaneously. A value of 0 indicates an unlimited number of threads. Pipe implementations that are not thread-safe, i.e. where doPipe() may only be called by one thread at a time, should make sure getMaxThreads always returns a value of 1.
    • getForwards

      Map<String,PipeForward> getForwards()
      Get pipe forwards.
    • registerForward

      void registerForward(PipeForward forward) throws ConfigurationException
      Register a PipeForward object to this Pipe. Global Forwards are added by the PipeLine. If a forward is already registered, it logs a warning.
      Throws:
      ConfigurationException - If the forward target cannot be registered.
      See Also:
    • start

      void start() throws PipeStartException
      Perform necessary action to start the pipe. This method is executed after the configure() method, for each start and stop command of the adapter.
      Throws:
      PipeStartException
    • stop

      void stop()
      Perform necessary actions to stop the Pipe.
      For instance, closing JMS connections, DBMS connections etc.
    • consumesSessionVariable

      boolean consumesSessionVariable(String sessionKey)
      returns true if the pipe or one of its children use the named session variable. Callers can use this to determine if a message needs to be preserved.
    • setPipeLine

      void setPipeLine(PipeLine pipeline)
      Allowing pipe to register things at Configuration time. Must be set before calling configure()
    • setGetInputFromSessionKey

      void setGetInputFromSessionKey(String string)
      If set, input is taken from this session key, instead of regular input
    • getGetInputFromSessionKey

      String getGetInputFromSessionKey()
    • setGetInputFromFixedValue

      void setGetInputFromFixedValue(String string)
      If set, this fixed value is taken as input, instead of regular input
    • getGetInputFromFixedValue

      String getGetInputFromFixedValue()
    • setEmptyInputReplacement

      void setEmptyInputReplacement(String string)
      If set and the input is empty, this fixed value is taken as input
    • getEmptyInputReplacement

      String getEmptyInputReplacement()
    • setPreserveInput

      void setPreserveInput(boolean preserveInput)
      If set true, the result of the pipe is replaced with the original input (i.e. the input before configured replacements of getInputFromSessionKey, getInputFromFixedValue or emptyInputReplacement)
    • isPreserveInput

      boolean isPreserveInput()
    • setStoreResultInSessionKey

      void setStoreResultInSessionKey(String string)
      If set, the result (before replacing when true) is stored under this session key
    • getStoreResultInSessionKey

      String getStoreResultInSessionKey()
    • setChompCharSize

      void setChompCharSize(String string)
      If set (>=0) and the character data length inside a xml element exceeds this size, the character data is chomped (with a clear comment)
    • getChompCharSize

      String getChompCharSize()
    • setElementToMove

      void setElementToMove(String string)
      If set, the character data in this element is stored under a session key and in the message replaced by a reference to this session key: {sessionKey: + elementToMoveSessionKey + }
    • getElementToMove

      String getElementToMove()
    • setElementToMoveSessionKey

      void setElementToMoveSessionKey(String string)
      (Only used when elementToMove is set) Name of the session key under which the character data is stored
      Default value
      ref_ + the name of the element
    • getElementToMoveSessionKey

      String getElementToMoveSessionKey()
    • setElementToMoveChain

      void setElementToMoveChain(String string)
      Like elementToMove but element is preceded with all ancestor elements and separated by semicolons (e.g. 'adapter;pipeline;pipe')
    • getElementToMoveChain

      String getElementToMoveChain()
    • setRemoveCompactMsgNamespaces

      void setRemoveCompactMsgNamespaces(boolean b)
    • isRemoveCompactMsgNamespaces

      boolean isRemoveCompactMsgNamespaces()
    • setRestoreMovedElements

      void setRestoreMovedElements(boolean restoreMovedElements)
      If set true, compacted messages in the result are restored to their original format (see also setElementToMove(java.lang.String))
    • isRestoreMovedElements

      boolean isRestoreMovedElements()
    • setDurationThreshold

      void setDurationThreshold(long maxDuration)
      If durationThreshold >=0 and the duration of the message processing exceeded the value specified (in milliseconds) the message is logged informatory to be analyzed
      Default value
      -1
    • getDurationThreshold

      long getDurationThreshold()
    • setLocker

      void setLocker(Locker locker)
      Optional Locker, to avoid parallel execution of the Pipe by multiple threads or servers. An exception is thrown when the lock cannot be obtained, e.g. in case another thread, may be in another server, holds the lock and does not release it in a timely manner.
    • getLocker

      Locker getLocker()
    • setWriteToSecLog

      void setWriteToSecLog(boolean b)
    • isWriteToSecLog

      boolean isWriteToSecLog()
    • setSecLogSessionKeys

      void setSecLogSessionKeys(String string)
      (Only used when writetoseclog=true) Comma separated list of keys of session variables that is appended to the security log record
    • getSecLogSessionKeys

      String getSecLogSessionKeys()
    • registerEvent

      void registerEvent(String description)
      Register an event for flexible monitoring.
    • throwEvent

      default void throwEvent(String event)
      Throw an event for flexible monitoring.
    • throwEvent

      void throwEvent(String event, Message eventMessage)
    • sizeStatisticsEnabled

      boolean sizeStatisticsEnabled()