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
functionNameis 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
paramListFields inherited from class org.frankframework.extensions.sap.jco3.SapFunctionFacade
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigure this component.com.sap.conn.jco.JCoFunctiongetFunction(SapSystemImpl sapSystem, ParameterValueList pvl) sendMessage(Message message, PipeLineSession session) Send a message to some destination (as configured in the Sender object).voidsetFunctionName(String string) Name of the RFC-function to be called in the SAP systemvoidsetFunctionNameParam(String string) Name of the parameter used to obtain the functionName from if the attributefunctionNameis emptyvoidsetSynchronous(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, stopMethods 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, setSapSystemNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContextMethods inherited from interface org.frankframework.core.FrankElement
addConfigWarningMethods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoaderMethods inherited from interface org.frankframework.core.HasPhysicalDestination
getPhysicalDestinationNameMethods inherited from interface org.frankframework.extensions.sap.ISapFunctionFacade
setCorrelationIdFieldIndex, setCorrelationIdFieldName, setReplyFieldIndex, setReplyFieldName, setRequestFieldIndex, setRequestFieldName, setSapSystemNameMethods inherited from interface org.frankframework.extensions.sap.ISapSender
getRequestFieldName, setLuwHandleSessionKey, setSapSystemNameParamMethods inherited from interface org.frankframework.core.ISender
isSynchronous, sendMessageOrThrow, start, stopMethods inherited from interface org.frankframework.core.ISenderWithParameters
consumesSessionVariableMethods inherited from interface org.frankframework.core.IWithParameters
addParameter, getParameterList
-
Constructor Details
-
SapSenderImpl
public SapSenderImpl()
-
-
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- Overrides:
configurein 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:ISenderSend 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()returnstruefalsereturn 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:
sendMessagein interfaceISender- Throws:
SenderException
-
setSynchronous
public void setSynchronous(boolean b) Description copied from class:SapSenderBaseIffalse, 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:
setSynchronousin interfaceISapSender- Overrides:
setSynchronousin classSapSenderBase
-
setFunctionName
Name of the RFC-function to be called in the SAP system- Specified by:
setFunctionNamein interfaceISapSender
-
setFunctionNameParam
Name of the parameter used to obtain the functionName from if the attributefunctionNameis empty- Specified by:
setFunctionNameParamin interfaceISapSender- Default value
- functionName
-