Class 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
Direct Known Subclasses:
SapSender, SapSender

public abstract class SapSenderImpl extends SapSenderBase implements ISapSender
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
  • Constructor Details

    • SapSenderImpl

      public SapSenderImpl()
  • Method Details

    • configure

      public void configure() throws ConfigurationException
      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 this IConfigurable. 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 the configure(), to improve performance.

      In the case of a container, this will propagate the configure signal to all components that apply.

      Specified by:
      configure in interface IConfigurable
      Overrides:
      configure in class SapSenderBase
      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 the configure() method is called.

      The following table shows the difference between synchronous and a-synchronous senders:

       synchronousa-synchronous
      ISender.isSynchronous() returnstruefalse
      return value of sendMessage() isthe reply-messagethe messageId of the message sent
      the correlationID specified with sendMessage()may be ignoredis sent with the message
      a {link TimeOutException}may be thrown if a timeout occurs waiting for a replyshould 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 interface ISender
      Throws:
      SenderException
    • setSynchronous

      public void setSynchronous(boolean b)
      Description copied from class: SapSenderBase
      If false, the sender operates in RR mode: the a reply is expected from SAP, and the sender does not participate in a transaction. When false, 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 interface ISapSender
      Overrides:
      setSynchronous in class SapSenderBase
    • setFunctionName

      public void setFunctionName(String string)
      Name of the RFC-function to be called in the SAP system
      Specified by:
      setFunctionName in interface ISapSender
    • setFunctionNameParam

      public void setFunctionNameParam(String string)
      Name of the parameter used to obtain the functionName from if the attribute functionName is empty
      Specified by:
      setFunctionNameParam in interface ISapSender
      Default value
      functionName