Class SapSenderImpl
java.lang.Object
org.frankframework.extensions.sap.jco3.SapFunctionFacade
org.frankframework.extensions.sap.jco3.SapSenderBase
org.frankframework.extensions.sap.jco3.SapSenderImpl
- All Implemented Interfaces:
FrankElement
,HasApplicationContext
,HasName
,HasPhysicalDestination
,IConfigurable
,IScopeProvider
,ISender
,ISenderWithParameters
,IWithParameters
,NameAware
,ISapFunctionFacade
,ISapSender
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
Implementation of
sender
that calls a SAP RFC-function.
N.B. If no requestFieldIndex or requestFieldName is specified, input is converted from xml;
If no replyFieldIndex or replyFieldName is specified, output is converted to xml.- Since:
- 5.0
- Author:
- Gerrit van Brakel, Jaco de Groot
- Specific parameters
- functionName defines functionName; required when attribute
functionName
is empty, inputfieldname The value of the parameter is set to the (simple) input field, structurename/inputfieldname The value of the parameter is set to the named field of the named structure
-
Field Summary
Fields inherited from class org.frankframework.extensions.sap.jco3.SapSenderBase
paramList
Fields inherited from class org.frankframework.extensions.sap.jco3.SapFunctionFacade
log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Configure this component.com.sap.conn.jco.JCoFunction
getFunction
(SapSystemImpl sapSystem, ParameterValueList pvl) sendMessage
(Message message, PipeLineSession session) Send a message to some destination (as configured in the Sender object).void
setFunctionName
(String string) Name of the RFC-function to be called in the SAP systemvoid
setFunctionNameParam
(String string) Name of the parameter used to obtain the functionName from if the attributefunctionName
is emptyvoid
setSynchronous
(boolean b) Iffalse
, the sender operates in RR mode: the a reply is expected from SAP, and the sender does not participate in a transaction.Methods inherited from class org.frankframework.extensions.sap.jco3.SapSenderBase
addParameter, getDestination, getParameterList, getSystem, getTid, setLuwHandleSessionKey, setSapSystemNameParam, start, stop
Methods inherited from class org.frankframework.extensions.sap.jco3.SapFunctionFacade
calculateStaticFieldIndices, closeFacade, findFieldIndex, functionCall2message, functionResult2message, getCorrelationIdFromField, getFunctionName, getFunctionTemplate, getFunctionTemplate, getLogPrefix, getPhysicalDestinationName, getSapSystem, getSapSystem, message2FunctionCall, message2FunctionResult, openFacade, setCorrelationIdFieldIndex, setCorrelationIdFieldName, setName, setParameters, setReplyFieldIndex, setReplyFieldName, setRequestFieldIndex, setRequestFieldName, setSapSystemName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
Methods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoader
Methods inherited from interface org.frankframework.core.HasPhysicalDestination
getDomain, getPhysicalDestinationName
Methods inherited from interface org.frankframework.extensions.sap.ISapFunctionFacade
setCorrelationIdFieldIndex, setCorrelationIdFieldName, setReplyFieldIndex, setReplyFieldName, setRequestFieldIndex, setRequestFieldName, setSapSystemName
Methods inherited from interface org.frankframework.extensions.sap.ISapSender
getRequestFieldName, setLuwHandleSessionKey, setSapSystemNameParam
Methods inherited from interface org.frankframework.core.ISender
isSynchronous, sendMessageOrThrow, start, stop
Methods inherited from interface org.frankframework.core.ISenderWithParameters
consumesSessionVariable
Methods inherited from interface org.frankframework.core.IWithParameters
addParameter, getParameterList
-
Constructor Details
-
SapSenderImpl
public SapSenderImpl()
-
-
Method Details
-
configure
Description copied from interface:IConfigurable
Configure 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:
configure
in interfaceIConfigurable
- Overrides:
configure
in classSapSenderBase
- Throws:
ConfigurationException
- in case it was not able to configure the component.
-
getFunction
public com.sap.conn.jco.JCoFunction getFunction(SapSystemImpl sapSystem, ParameterValueList pvl) throws SapException - Throws:
SapException
-
sendMessage
@Nonnull public SenderResult sendMessage(@Nonnull Message message, @Nonnull PipeLineSession session) throws SenderException Description copied from interface:ISender
Send a message to some destination (as configured in the Sender object). This method may only be called after theconfigure()
method is called.The following table shows the difference between synchronous and a-synchronous senders:
synchronous a-synchronous ISender.isSynchronous()
returnstrue
false
return value of sendMessage()
isthe reply-message the messageId of the message sent the correlationID specified with sendMessage()
may be ignored is sent with the message a {link TimeOutException} may be thrown if a timeout occurs waiting for a reply should not be expected Multiple objects may try to call this method at the same time, from different threads. Implementations of this method should therefore be thread-safe, or
synchronized
.- Specified by:
sendMessage
in interfaceISender
- Throws:
SenderException
-
setSynchronous
public void setSynchronous(boolean b) Description copied from class:SapSenderBase
Iffalse
, the sender operates in RR mode: the a reply is expected from SAP, and the sender does not participate in a transaction. Whenfalse
, the sender operates in FF mode: no reply is expected from SAP, and the sender joins the transaction, that must be present. The SAP transaction is committed right after the XA transaction is completed.- Specified by:
setSynchronous
in interfaceISapSender
- Overrides:
setSynchronous
in classSapSenderBase
-
setFunctionName
Name of the RFC-function to be called in the SAP system- Specified by:
setFunctionName
in interfaceISapSender
-
setFunctionNameParam
Name of the parameter used to obtain the functionName from if the attributefunctionName
is empty- Specified by:
setFunctionNameParam
in interfaceISapSender
- Default value
- functionName
-