Package org.frankframework.core
Class AbstractResponseValidatorWrapper<V extends AbstractValidator>
java.lang.Object
org.frankframework.core.AbstractResponseValidatorWrapper<V>
- All Implemented Interfaces:
FrankElement,HasApplicationContext,HasName,IConfigurable,IForwardTarget,IPipe,IScopeProvider,IValidator,NameAware,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.Lifecycle
- Direct Known Subclasses:
AbstractValidator.ResponseValidatorWrapper,XmlValidator.ResponseValidatorWrapper
public abstract class AbstractResponseValidatorWrapper<V extends AbstractValidator>
extends Object
implements IValidator
Wrapper for the response validator. It has its own name and forwards, but delegates the actual work to the original validator.
It overrides the stop and start method to prevent the original validator from being started and stopped.
-
Field Summary
FieldsFields inherited from interface org.frankframework.core.IPipe
LONG_DURATION_MONITORING_EVENT, MESSAGE_SIZE_MONITORING_EVENT, PIPE_EXCEPTION_MONITORING_EVENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddForward(PipeForward forward) Register a PipeForward object to this Pipe.voidConfigure this component.booleanconsumesSessionVariable(String sessionKey) returnstrueif the pipe or one of its children use the named session variable.doPipe(Message message, PipeLineSession session) This is where the action takes place.org.springframework.context.ApplicationContextThis ClassLoader is set upon creation of the object, used to retrieve resources configured by the Ibis application.longGet pipe forwards.intIndicates the maximum number of threads that may calldoPipe()simultaneously.booleanbooleanbooleanbooleanbooleanvoidregisterEvent(String description) Register an event for flexible monitoring.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetChompCharSize(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)voidsetDurationThreshold(long maxDuration) If durationThreshold >=0 and the duration of the message processing exceeded the value specified (in milliseconds) the message will be logged and a monitor event will be fired.voidsetElementToMove(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+ }voidsetElementToMoveChain(String string) LikeelementToMovebut element is preceded with all ancestor elements and separated by semicolons (e.g.voidsetElementToMoveSessionKey(String string) (Only used whenelementToMoveis set) Name of the session key under which the character data is storedvoidsetEmptyInputReplacement(String string) If set and the input is empty, this fixed value is taken as inputvoidsetGetInputFromFixedValue(String string) If set, this fixed value is taken as input, instead of regular inputvoidsetGetInputFromSessionKey(String string) If set, input is taken from this session key, instead of regular inputvoidsetHideRegex(String hideRegex) Regular expression to mask strings in the log.voidOptional Locker, to avoid parallel execution of the Pipe by multiple threads or servers.voidsetLogIntermediaryResults(String string) when set, the value in AppConstants is overwritten (for this pipe only)voidsetPipeLine(PipeLine pipeline) Allowing pipe to register things at Configuration time.voidsetPreserveInput(boolean preserveInput) If settrue, the result of the pipe is replaced with the original input (i.e. the input before configured replacements ofgetInputFromSessionKey,getInputFromFixedValueoremptyInputReplacement)voidsetRemoveCompactMsgNamespaces(boolean b) voidsetRestoreMovedElements(boolean restoreMovedElements) If settrue, compacted messages in the result are restored to their original format (see alsoIPipe.setElementToMove(java.lang.String))voidsetSecLogSessionKeys(String string) (Only used whenwritetoseclog=true) Comma separated list of keys of session variables that is appended to the security log recordvoidsetStoreResultInSessionKey(String string) If set, the result (before replacing whentrue) is stored under this session keyvoidsetWriteToSecLog(boolean b) booleanvoidstart()Perform necessary action to start the pipe.voidstop()Perform necessary actions to stop thePipe.
For instance, closing JMS connections, DBMS connections etc.voidthrowEvent(String event, Message eventMessage) validate(Message message, PipeLineSession session, String messageRoot) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.frankframework.core.FrankElement
addConfigWarningMethods inherited from interface org.frankframework.core.IForwardTarget
getNameMethods inherited from interface org.frankframework.core.IPipe
throwEventMethods inherited from interface org.frankframework.core.IValidator
setName
-
Field Details
-
owner
-
-
Constructor Details
-
AbstractResponseValidatorWrapper
-
-
Method Details
-
configure
Description copied from interface:IConfigurableConfigure this component.configure()is called once at startup of the framework in the configure method of the owner of thisIConfigurable. Purpose of this method is to check whether the static configuration of the object is correct. As much as possible class-instantiating should take place in theconfigure(), to improve performance.In the case of a container, this will propagate the configure signal to all components that apply.
- Specified by:
configurein interfaceIConfigurable- Throws:
ConfigurationException- in case it was not able to configure the component.
-
doPipe
Description copied from interface:IPipeThis 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:
doPipein interfaceIPipe- Throws:
PipeRunException
-
validate
public PipeRunResult validate(Message message, PipeLineSession session, String messageRoot) throws PipeRunException - Specified by:
validatein interfaceIValidator- Throws:
PipeRunException
-
getMaxThreads
public int getMaxThreads()Description copied from interface:IPipeIndicates 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.- Specified by:
getMaxThreadsin interfaceIPipe
-
getForwards
Description copied from interface:IPipeGet pipe forwards.- Specified by:
getForwardsin interfaceIPipe
-
addForward
Description copied from interface:IPipeRegister a PipeForward object to this Pipe. Global Forwards are added by the PipeLine. If a forward is already registered, it logs a warning.- Specified by:
addForwardin interfaceIPipe- See Also:
-
start
public void start()Description copied from interface:IPipePerform necessary action to start the pipe. This method is executed after theIConfigurable.configure()method, for each start and stop command of the adapter. -
stop
public void stop()Description copied from interface:IPipePerform necessary actions to stop thePipe.
For instance, closing JMS connections, DBMS connections etc. -
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext()- Specified by:
getApplicationContextin interfaceHasApplicationContext
-
getConfigurationClassLoader
Description copied from interface:IScopeProviderThis ClassLoader is set upon creation of the object, used to retrieve resources configured by the Ibis application.- Specified by:
getConfigurationClassLoaderin interfaceHasApplicationContext- Specified by:
getConfigurationClassLoaderin interfaceIScopeProvider- Returns:
- returns the ClassLoader created by the
ClassLoaderManager.
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
consumesSessionVariable
Description copied from interface:IPipereturnstrueif 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.- Specified by:
consumesSessionVariablein interfaceIPipe
-
setPipeLine
Description copied from interface:IPipeAllowing pipe to register things at Configuration time. Must be set before calling configure()- Specified by:
setPipeLinein interfaceIPipe
-
setGetInputFromSessionKey
Description copied from interface:IPipeIf set, input is taken from this session key, instead of regular input- Specified by:
setGetInputFromSessionKeyin interfaceIPipe
-
getGetInputFromSessionKey
- Specified by:
getGetInputFromSessionKeyin interfaceIPipe
-
setGetInputFromFixedValue
Description copied from interface:IPipeIf set, this fixed value is taken as input, instead of regular input- Specified by:
setGetInputFromFixedValuein interfaceIPipe
-
getGetInputFromFixedValue
- Specified by:
getGetInputFromFixedValuein interfaceIPipe
-
setEmptyInputReplacement
Description copied from interface:IPipeIf set and the input is empty, this fixed value is taken as input- Specified by:
setEmptyInputReplacementin interfaceIPipe
-
getEmptyInputReplacement
- Specified by:
getEmptyInputReplacementin interfaceIPipe
-
setPreserveInput
public void setPreserveInput(boolean preserveInput) Description copied from interface:IPipeIf settrue, the result of the pipe is replaced with the original input (i.e. the input before configured replacements ofgetInputFromSessionKey,getInputFromFixedValueoremptyInputReplacement)- Specified by:
setPreserveInputin interfaceIPipe
-
isPreserveInput
public boolean isPreserveInput()- Specified by:
isPreserveInputin interfaceIPipe
-
setStoreResultInSessionKey
Description copied from interface:IPipeIf set, the result (before replacing whentrue) is stored under this session key- Specified by:
setStoreResultInSessionKeyin interfaceIPipe
-
getStoreResultInSessionKey
- Specified by:
getStoreResultInSessionKeyin interfaceIPipe
-
setChompCharSize
Description copied from interface:IPipeIf set (>=0) and the character data length inside a xml element exceeds this size, the character data is chomped (with a clear comment)- Specified by:
setChompCharSizein interfaceIPipe
-
getChompCharSize
- Specified by:
getChompCharSizein interfaceIPipe
-
setElementToMove
Description copied from interface:IPipeIf 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+ }- Specified by:
setElementToMovein interfaceIPipe
-
getElementToMove
- Specified by:
getElementToMovein interfaceIPipe
-
setElementToMoveSessionKey
Description copied from interface:IPipe(Only used whenelementToMoveis set) Name of the session key under which the character data is stored- Specified by:
setElementToMoveSessionKeyin interfaceIPipe
-
getElementToMoveSessionKey
- Specified by:
getElementToMoveSessionKeyin interfaceIPipe
-
setElementToMoveChain
Description copied from interface:IPipeLikeelementToMovebut element is preceded with all ancestor elements and separated by semicolons (e.g. 'adapter;pipeline;pipe')- Specified by:
setElementToMoveChainin interfaceIPipe
-
getElementToMoveChain
- Specified by:
getElementToMoveChainin interfaceIPipe
-
setRemoveCompactMsgNamespaces
public void setRemoveCompactMsgNamespaces(boolean b) - Specified by:
setRemoveCompactMsgNamespacesin interfaceIPipe
-
isRemoveCompactMsgNamespaces
public boolean isRemoveCompactMsgNamespaces()- Specified by:
isRemoveCompactMsgNamespacesin interfaceIPipe
-
setRestoreMovedElements
public void setRestoreMovedElements(boolean restoreMovedElements) Description copied from interface:IPipeIf settrue, compacted messages in the result are restored to their original format (see alsoIPipe.setElementToMove(java.lang.String))- Specified by:
setRestoreMovedElementsin interfaceIPipe
-
isRestoreMovedElements
public boolean isRestoreMovedElements()- Specified by:
isRestoreMovedElementsin interfaceIPipe
-
setDurationThreshold
public void setDurationThreshold(long maxDuration) Description copied from interface:IPipeIf durationThreshold >=0 and the duration of the message processing exceeded the value specified (in milliseconds) the message will be logged and a monitor event will be fired.- Specified by:
setDurationThresholdin interfaceIPipe
-
getDurationThreshold
public long getDurationThreshold()- Specified by:
getDurationThresholdin interfaceIPipe
-
setLocker
Description copied from interface:IPipeOptional 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
-
setWriteToSecLog
public void setWriteToSecLog(boolean b) - Specified by:
setWriteToSecLogin interfaceIPipe
-
isWriteToSecLog
public boolean isWriteToSecLog()- Specified by:
isWriteToSecLogin interfaceIPipe
-
setSecLogSessionKeys
Description copied from interface:IPipe(Only used whenwritetoseclog=true) Comma separated list of keys of session variables that is appended to the security log record- Specified by:
setSecLogSessionKeysin interfaceIPipe
-
getSecLogSessionKeys
- Specified by:
getSecLogSessionKeysin interfaceIPipe
-
registerEvent
Description copied from interface:IPipeRegister an event for flexible monitoring.- Specified by:
registerEventin interfaceIPipe
-
throwEvent
- Specified by:
throwEventin interfaceIPipe
-
sizeStatisticsEnabled
public boolean sizeStatisticsEnabled()- Specified by:
sizeStatisticsEnabledin interfaceIPipe
-
setHideRegex
Description copied from interface:IPipeRegular 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 ahideRegexset 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 = 0for how regular expressions are matched and replaced.- Specified by:
setHideRegexin interfaceIPipe
-
getHideRegex
- Specified by:
getHideRegexin interfaceIPipe
-
setLogIntermediaryResults
Description copied from interface:IPipewhen set, the value in AppConstants is overwritten (for this pipe only)- Specified by:
setLogIntermediaryResultsin interfaceIPipe
-
getLogIntermediaryResults
- Specified by:
getLogIntermediaryResultsin interfaceIPipe
-