@ComponentProfile(summary="Execute a SAP RFC", tag="producer,sap,rfc", recommended={ConfiguredRfcConnection.class,DynamicRfcConnection.class}) public class RfcProducer extends com.adaptris.core.RequestReplyProducerImp implements com.adaptris.core.licensing.LicensedComponent
Implementation of AdaptrisMessageProducer
based on SAP JCO3 libraries.
In order to use this producer you will have previously downloaded, installed and configured SAP Java Connector. The jar files should be copied into the adapter's lib directory, but any native libraries should be configured as per the SAP Java Connector documentation.
The following behavioural rules apply :
ConfiguredRfcConnection
unless there is a JCoDestination
available in object metadata stored under the key RfcConstants.OBJ_METADATA_DESTINATION_KEY
in which case, the associated
connection is ignored.ProduceDestination
will be used as the RFC Function nameConfiguredRfcConnection
,
RfcServiceList
In the adapter configuration file this class is aliased as sapjco3-rfc-producer which is the preferred alternative to the fully qualified classname when building your configuration.
License Required: ENTERPRISE
Constructor and Description |
---|
RfcProducer() |
Modifier and Type | Method and Description |
---|---|
void |
addExportParameter(ExportParameter p)
Add an export parameter to the list of export parameters used to make the
RFC Call.
|
void |
addImportParameter(ImportParameter p)
Add an import parameter to the list of import parameters used to make the
RFC Call.
|
protected long |
defaultTimeout() |
protected void |
doProduce(com.adaptris.core.AdaptrisMessage msg,
java.lang.String endpoint) |
protected com.adaptris.core.AdaptrisMessage |
doRequest(com.adaptris.core.AdaptrisMessage msg,
java.lang.String endpoint,
long timeout) |
java.lang.String |
endpoint(com.adaptris.core.AdaptrisMessage msg) |
com.adaptris.core.ProduceDestination |
getDestination() |
java.util.List<ExportParameter> |
getExportParameters() |
java.util.List<ImportParameter> |
getImportParameters() |
java.lang.String |
getName() |
boolean |
isEnabled(com.adaptris.core.licensing.License license) |
void |
prepare() |
void |
setDestination(com.adaptris.core.ProduceDestination destination) |
void |
setExportParameters(java.util.List<ExportParameter> l) |
void |
setImportParameters(java.util.List<ImportParameter> l) |
void |
setName(java.lang.String rfcName)
The name of the RFC/BAPI to execute.
|
<T extends RfcProducer> |
withExportParameters(java.util.List<ExportParameter> s) |
<T extends RfcProducer> |
withImportParameters(java.util.List<ImportParameter> s) |
<T extends RfcProducer> |
withName(java.lang.String s) |
produce, produce, request, request, request, request
copyReplyContents, getIgnoreReplyMetadata, mergeReply, setIgnoreReplyMetadata
createQualifier, decode, encode, getEncoder, getIsTrackingEndpoint, getMessageFactory, getUniqueId, handleConnectionException, isTrackingEndpoint, registerConnection, registerEncoderMessageFactory, retrieveConnection, setEncoder, setIsTrackingEndpoint, setMessageFactory, setUniqueId, withMessageFactory, withUniqueID
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void prepare() throws com.adaptris.core.CoreException
prepare
in interface com.adaptris.core.ComponentLifecycleExtension
com.adaptris.core.CoreException
public boolean isEnabled(com.adaptris.core.licensing.License license)
isEnabled
in interface com.adaptris.core.licensing.LicensedComponent
protected com.adaptris.core.AdaptrisMessage doRequest(com.adaptris.core.AdaptrisMessage msg, java.lang.String endpoint, long timeout) throws com.adaptris.core.ProduceException
doRequest
in class com.adaptris.core.RequestReplyProducerImp
com.adaptris.core.ProduceException
protected void doProduce(com.adaptris.core.AdaptrisMessage msg, java.lang.String endpoint) throws com.adaptris.core.ProduceException
doProduce
in class com.adaptris.core.RequestReplyProducerImp
com.adaptris.core.ProduceException
public java.util.List<ImportParameter> getImportParameters()
public void setImportParameters(java.util.List<ImportParameter> l)
l
- the inputParameters to setpublic void addImportParameter(ImportParameter p)
p
- an ImportParameterpublic java.util.List<ExportParameter> getExportParameters()
public void setExportParameters(java.util.List<ExportParameter> l)
l
- the outputParameters to setpublic void addExportParameter(ExportParameter p)
p
- an ExportParameterprotected long defaultTimeout()
defaultTimeout
in class com.adaptris.core.RequestReplyProducerBase
RequestReplyProducerBase.defaultTimeout()
public com.adaptris.core.ProduceDestination getDestination()
public void setDestination(com.adaptris.core.ProduceDestination destination)
public java.lang.String getName()
public void setName(java.lang.String rfcName)
public <T extends RfcProducer> T withName(java.lang.String s)
public <T extends RfcProducer> T withImportParameters(java.util.List<ImportParameter> s)
public <T extends RfcProducer> T withExportParameters(java.util.List<ExportParameter> s)
public java.lang.String endpoint(com.adaptris.core.AdaptrisMessage msg) throws com.adaptris.core.ProduceException
endpoint
in class com.adaptris.core.AdaptrisMessageProducerImp
com.adaptris.core.ProduceException
Copyright Adaptris