Package org.frankframework.core
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:
AbstractCollectorPipe
,AbstractLdapQueryPipe
,AbstractPipe
,AbstractResponseValidatorWrapper
,AbstractValidator
,AbstractValidator.ResponseValidatorWrapper
,ApiPrincipalPipe
,AsyncSenderWithListenerPipe
,Base64Pipe
,BlobLineIteratingPipe
,BytesOutputPipe
,ChecksumPipe
,ClobLineIteratingPipe
,CompareIntegerPipe
,CompareStringPipe
,CompressPipe
,CounterSwitchPipe
,CredentialCheckingPipe
,CrlPipe
,CsvParserPipe
,DataSonnetPipe
,DelayPipe
,DomainTransformerPipe
,EchoPipe
,EscapePipe
,EtagHandlerPipe
,ExceptionPipe
,FileLineIteratorPipe
,FilenameSwitch
,FixedForwardPipe
,FixedResultPipe
,ForEachChildElementPipe
,ForPipe
,GetFromSession
,GetPrincipalPipe
,HashPipe
,IncreaseIntegerPipe
,IsUserInRolePipe
,IsXmlPipe
,IteratingPipe
,JdbcIteratingPipeBase
,Json2XmlValidator
,JsonPipe
,JsonValidator
,JsonWellFormedChecker
,JsonXsltPipe
,JwtPipe
,LdapChallengePipe
,LdapFindGroupMembershipsPipe
,LdapFindMemberPipe
,LobLineIteratingPipeBase
,LogContextPipe
,MailSenderPipe
,MessageSendingPipe
,PasswordGeneratorPipe
,PasswordHashPipe
,PGPPipe
,PostboxRetrieverPipe
,PutInSession
,PutParametersInSession
,PutSystemDateInSession
,RegExPipe
,RemoveCacheKeyPipe
,RemoveFromSession
,ReplacerPipe
,ResultSetIteratingPipe
,SenderPipe
,SignaturePipe
,SizePipe
,SkipPipe
,SoapValidator
,SoapWrapperPipe
,Stream2StringPipe
,StreamLineIteratorPipe
,StreamPipe
,StringIteratorPipe
,Text2XmlPipe
,TextSplitterPipe
,TimeoutGuardPipe
,UnzipPipe
,UUIDGeneratorPipe
,WsdlGeneratorPipe
,WsdlXmlValidator
,XmlBuilderPipe
,XmlFileElementIteratorPipe
,XmlIf
,XmlSwitch
,XmlValidator
,XmlValidator.ResponseValidatorWrapper
,XmlWellFormedChecker
,XQueryPipe
,XsltPipe
,ZipIteratorPipe
,ZipWriterPipe
A Pipe represents an action to take in a
PipeLine
.- Author:
- Johan Verrips
- Default element
- org.frankframework.pipes.SenderPipe
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addForward
(PipeForward forward) Register a PipeForward object to this Pipe.void
boolean
consumesSessionVariable
(String sessionKey) returnstrue
if the pipe or one of its children use the named session variable.doPipe
(Message message, PipeLineSession session) This is where the action takes place.long
Get pipe forwards.int
Indicates the maximum number of threads that may calldoPipe()
simultaneously.boolean
boolean
boolean
boolean
void
registerEvent
(String description) Register an event for flexible monitoring.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)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 analyzedvoid
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
+ }void
setElementToMoveChain
(String string) LikeelementToMove
but element is preceded with all ancestor elements and separated by semicolons (e.g.void
setElementToMoveSessionKey
(String string) (Only used whenelementToMove
is set) Name of the session key under which the character data is storedvoid
setEmptyInputReplacement
(String string) If set and the input is empty, this fixed value is taken as inputvoid
setGetInputFromFixedValue
(String string) If set, this fixed value is taken as input, instead of regular inputvoid
setGetInputFromSessionKey
(String string) If set, input is taken from this session key, instead of regular inputvoid
setHideRegex
(String hideRegex) Regular expression to mask strings in the log.void
Optional Locker, to avoid parallel execution of the Pipe by multiple threads or servers.void
setLogIntermediaryResults
(String string) when set, the value in AppConstants is overwritten (for this pipe only)void
setPipeLine
(PipeLine pipeline) Allowing pipe to register things at Configuration time.void
setPreserveInput
(boolean preserveInput) If settrue
, the result of the pipe is replaced with the original input (i.e. the input before configured replacements ofgetInputFromSessionKey
,getInputFromFixedValue
oremptyInputReplacement
)void
setRemoveCompactMsgNamespaces
(boolean b) void
setRestoreMovedElements
(boolean restoreMovedElements) If settrue
, compacted messages in the result are restored to their original format (see alsosetElementToMove(java.lang.String)
)void
setSecLogSessionKeys
(String string) (Only used whenwritetoseclog=true
) Comma separated list of keys of session variables that is appended to the security log recordvoid
setStoreResultInSessionKey
(String string) If set, the result (before replacing whentrue
) is stored under this session keyvoid
setWriteToSecLog
(boolean b) boolean
void
start()
Perform necessary action to start the pipe.void
stop()
Perform necessary actions to stop thePipe
.
For instance, closing JMS connections, DBMS connections etc.default void
throwEvent
(String event) Throw an event for flexible monitoring.void
throwEvent
(String event, Message eventMessage) Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
Methods inherited from interface org.frankframework.core.IConfigurationAware
getApplicationContext, getName
Methods inherited from interface org.frankframework.core.IForwardTarget
getName
Methods inherited from interface org.frankframework.core.INamedObject
getName, setName
Methods inherited from interface org.frankframework.core.IScopeProvider
getConfigurationClassLoader
-
Field Details
-
LONG_DURATION_MONITORING_EVENT
- See Also:
-
PIPE_EXCEPTION_MONITORING_EVENT
- See Also:
-
MESSAGE_SIZE_MONITORING_EVENT
- See Also:
-
-
Method Details
-
configure
configure()
is called once after thePipeLine
is registered at theAdapter
. Purpose of this method is to reduce creating connections to databases etc. in thedoPipe()
method. As much as possible class-instantiating should take place in theconfigure()
method, to improve performance.- Specified by:
configure
in interfaceIConfigurable
- Throws:
ConfigurationException
-
doPipe
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 theFixedResultPipe
, the Pipe can schedule the input to be closed at session exit, by callingMessage.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 calldoPipe()
simultaneously. A value of 0 indicates an unlimited number of threads. Pipe implementations that are not thread-safe, i.e. wheredoPipe()
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. -
addForward
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
Perform necessary action to start the pipe. This method is executed after theconfigure()
method, for each start and stop command of the adapter.- Throws:
PipeStartException
-
stop
void stop()Perform necessary actions to stop thePipe
.
For instance, closing JMS connections, DBMS connections etc. -
consumesSessionVariable
returnstrue
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
Allowing pipe to register things at Configuration time. Must be set before calling configure() -
setGetInputFromSessionKey
If set, input is taken from this session key, instead of regular input -
getGetInputFromSessionKey
String getGetInputFromSessionKey() -
setGetInputFromFixedValue
If set, this fixed value is taken as input, instead of regular input -
getGetInputFromFixedValue
String getGetInputFromFixedValue() -
setEmptyInputReplacement
If set and the input is empty, this fixed value is taken as input -
getEmptyInputReplacement
String getEmptyInputReplacement() -
setPreserveInput
void setPreserveInput(boolean preserveInput) If settrue
, the result of the pipe is replaced with the original input (i.e. the input before configured replacements ofgetInputFromSessionKey
,getInputFromFixedValue
oremptyInputReplacement
) -
isPreserveInput
boolean isPreserveInput() -
setStoreResultInSessionKey
If set, the result (before replacing whentrue
) is stored under this session key -
getStoreResultInSessionKey
String getStoreResultInSessionKey() -
setChompCharSize
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
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
(Only used whenelementToMove
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
LikeelementToMove
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 settrue
, compacted messages in the result are restored to their original format (see alsosetElementToMove(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
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
(Only used whenwritetoseclog=true
) Comma separated list of keys of session variables that is appended to the security log record -
getSecLogSessionKeys
String getSecLogSessionKeys() -
registerEvent
Register an event for flexible monitoring. -
throwEvent
Throw an event for flexible monitoring. -
throwEvent
-
sizeStatisticsEnabled
boolean sizeStatisticsEnabled() -
setHideRegex
Regular expression to mask strings in the log. For example, the regular expression(?<=<password>).*?(?=</password>)
will replace every character between keys '<password>' and '</password>'. note: this feature is used at adapter level, so ahideRegex
set on one pipe affects all pipes in the pipeline (and multiple values in different pipes are combined into a single regex). The regular expressions are matched against part of the log lines. SeeStringUtil.hideAll(String, Collection, int)
withmode = 0
for how regular expressions are matched and replaced. -
getHideRegex
String getHideRegex() -
setLogIntermediaryResults
when set, the value in AppConstants is overwritten (for this pipe only) -
getLogIntermediaryResults
String getLogIntermediaryResults()
-