Class RekenBoxCaller
java.lang.Object
org.frankframework.core.TransactionAttributes
org.frankframework.pipes.AbstractPipe
org.frankframework.pipes.FixedForwardPipe
org.frankframework.extensions.rekenbox.RekenBoxCaller
- 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
Perform a call to a RekenBox.
The inputmessage is written to a temporary file and passed as inputfile to the rekenbox. The contents of the outputfile of the
rekenbox is returned as output message. The name of the rekenbox, as determined from the inputfile, is optionally written to
the pipeLineSession.
Note:
The rekenbox-name is currently determined from the first 8 characters of the file, or up
to the first space (' ') or colon (':') character. Beware that if the first character of the
file is a newline character or something similar, less characters are available to pass the
rekenbox-name on. Especially if the inputmessages are constructed by means of an XSLT-stylesheet,
messages often start with a newline character.
- Author:
- Gerrit van Brakel
-
Field Summary
Fields inherited from class org.frankframework.pipes.AbstractPipe
parameterNamesMustBeUnique
Fields inherited from class org.frankframework.core.TransactionAttributes
log
Fields 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 TypeMethodDescriptionvoid
Checks for correct configuration of forward.doPipe
(Message message, PipeLineSession session) positie 1 t/m 8 bepalen de naam van de executable, of tot aan de ':' (wat het eerst komt)static String
fileToString
(String fileName, String endOfLineString, boolean xmlEncode) Deprecated.long
protected boolean
inputFileExists
(long requestNumber, String extension) boolean
protected String
makeFileName
(long requestno, String extension) void
setCleanup
(boolean newCleanup) Iftrue
, input and output files are removed after the call to the rekenbox is finishedvoid
setCommandLineType
(String newCommandLineType) Format of commandline of rekenbox.void
setDataFilenamePrefix
(String string) First part of filenames that communicate requests and replies to rekenboxvoid
setExecutableExtension
(String newExecutableExtension) Extension of rekenbox-executablevoid
setInputOutputDirectory
(String newInputOutputDirectory) Directory on server where input and output files are (temporarily) storedvoid
setMaxRequestNumber
(long l) Maximal number that will be concatenated to dataFilenamePrefixvoid
setRekenBoxName
(String string) Fixed name of the rekenbox (or wrapper) to be called.void
setRekenboxSessionKey
(String newRekenboxSessionKey) Key in pipeLineSession to store rekenbox name invoid
setRunPath
(String newRunPath) Directory on server where rekenbox-executable can be foundvoid
setTemplateDir
(String newTemplateDir) Rekenbox template directory on serverMethods inherited from class org.frankframework.pipes.FixedForwardPipe
getParameterValue, setIfParam, setIfValue, setOnlyIfSessionKey, setOnlyIfValue, setSkipOnEmptyInput, setUnlessSessionKey, setUnlessValue, skipPipe
Methods inherited from class org.frankframework.pipes.AbstractPipe
addForward, addParameter, consumesSessionVariable, createBean, findForward, getAdapter, getEventSourceName, getForwards, getParameterList, hasRegisteredForward, isRunning, registerEvent, setApplicationContext, setChompCharSize, setDurationThreshold, setElementToMove, setElementToMoveChain, setElementToMoveSessionKey, setEmptyInputReplacement, setGetInputFromFixedValue, setGetInputFromSessionKey, setHideRegex, setLocker, setLogIntermediaryResults, setMaxThreads, setName, setPreserveInput, setRemoveCompactMsgNamespaces, setRestoreMovedElements, setSecLogSessionKeys, setSizeStatistics, setStoreResultInSessionKey, setWriteToSecLog, sizeStatisticsEnabled, start, stop, throwEvent
Methods inherited from class org.frankframework.core.TransactionAttributes
configureTransactionAttributes, isTransacted, isTransacted, setTransacted, setTransactionTimeout
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoader
Methods inherited from interface org.frankframework.core.HasTransactionAttribute
getTransactionAttribute, getTransactionTimeout, getTxDef, setTransactionAttribute
Methods inherited from interface org.frankframework.core.IForwardTarget
getName
Methods inherited from interface org.frankframework.core.IPipe
getChompCharSize, getDurationThreshold, getElementToMove, getElementToMoveChain, getElementToMoveSessionKey, getEmptyInputReplacement, getGetInputFromFixedValue, getGetInputFromSessionKey, getHideRegex, getLocker, getLogIntermediaryResults, getMaxThreads, getSecLogSessionKeys, getStoreResultInSessionKey, isPreserveInput, isRemoveCompactMsgNamespaces, isRestoreMovedElements, isWriteToSecLog, setPipeLine, throwEvent
-
Constructor Details
-
Method Details
-
configure
Description copied from class:FixedForwardPipe
Checks for correct configuration of forward.- Specified by:
configure
in interfaceIConfigurable
- Overrides:
configure
in classFixedForwardPipe
- Throws:
ConfigurationException
- in case it was not able to configure the component.
-
inputFileExists
-
makeFileName
-
getBaseFileName
-
doPipe
positie 1 t/m 8 bepalen de naam van de executable, of tot aan de ':' (wat het eerst komt)- Throws:
PipeRunException
-
fileToString
@Deprecated public static String fileToString(String fileName, String endOfLineString, boolean xmlEncode) throws IOException Deprecated.Please consider usingStreamUtil.resourceToString(URL, String, boolean)
instead of relying on files.- Throws:
IOException
-
setRekenBoxName
Fixed name of the rekenbox (or wrapper) to be called. If empty, the name is determined from the request -
getRekenBoxName
-
setRunPath
Directory on server where rekenbox-executable can be found -
getRunPath
-
setTemplateDir
Rekenbox template directory on server -
getTemplateDir
-
setInputOutputDirectory
Directory on server where input and output files are (temporarily) stored -
getInputOutputDirectory
-
setCommandLineType
Format of commandline of rekenbox. Possible values "straight": rekenbox is called like: rekenbox.exe inputFileName outputFileName templateDir "switches": rekenbox is called like: rekenbox.exe /IinputFileName /UoutputFileName /PtemplateDir "redirected": rekenbox is called like: rekenbox.exe inputFileName templateDir > outputFileName; (This method has not been fully tested) -
getCommandLineType
-
setExecutableExtension
Extension of rekenbox-executable -
getExecutableExtension
-
setCleanup
public void setCleanup(boolean newCleanup) Iftrue
, input and output files are removed after the call to the rekenbox is finished -
isCleanup
public boolean isCleanup() -
setRekenboxSessionKey
Key in pipeLineSession to store rekenbox name in -
getRekenboxSessionKey
-
setDataFilenamePrefix
First part of filenames that communicate requests and replies to rekenbox -
getDataFilenamePrefix
-
setMaxRequestNumber
public void setMaxRequestNumber(long l) Maximal number that will be concatenated to dataFilenamePrefix -
getMaxRequestNumber
public long getMaxRequestNumber()
-