Class RfcConnectionManager
- java.lang.Object
- 
- com.redwood.scheduler.api.connector.sap.rfc.scripting.RfcConnectionManager
 
- 
 public class RfcConnectionManager extends Object The connection manager allows you to establish an RFC connection to an SAP system.Connecting using the SAP System; will use the default client: Connecting using the SAP System, client, and credential:{ Partition part = jcsSession.getPartitionByName("MyPartition"); SAPSystem sapSystem = jcsSession.getSAPSystemByName(part, "NSP"); RfcConnectionManager rfcConnectionManager = new RfcConnectionManager(sapSystem); }
 The credential protocol must be{ Partition part = jcsSession.getPartitionByName("MyPartition"); SAPSystem sapSystem = jcsSession.getSAPSystemByName(part, "NSP"); Credential credential = jcsSession.getCredentialByCredentialProtocolEndpointRealUser(part, "SAP_RFC", "MyPartition.NSP", "jdoe"); RfcConnectionManager rfcConnectionManager = new RfcConnectionManager(sapSystem, "000", credential); }SAP_RFC, the 'Endpoint' should be filled with the 'partition.name' of the SAP system, the 'Real User' with the SAP user name.Connecting using the SAP System, client, username, and password (here, the password is stored in a parameter of type Password.) Connecting using the name of the SAP System; will use the default client:{ Partition part = jcsSession.getPartitionByName("MyPartition"); SAPSystem sapSystem = jcsSession.getSAPSystemByName(part, "NSP"); RfcConnectionManager rfcConnectionManager = new RfcConnectionManager(sapSystem, "000", "user", passwordParameter); }{ RfcConnectionManager rfcConnectionManager = new RfcConnectionManager(jcsSession, "MyPartition.NSP"); }
- 
- 
Constructor SummaryConstructors Constructor Description RfcConnectionManager(SAPSystem sapSystem)Create an RFC connection manager for the given SAP system.RfcConnectionManager(SAPSystem sapSystem, String clientNumber)Create an RFC connection manager for the given SAP system.RfcConnectionManager(SAPSystem sapSystem, String clientNumber, Credential credential)Create an RFC connection manager for the given SAP system.RfcConnectionManager(SAPSystem sapSystem, String clientNumber, String language)Create an RFC connection manager for the given SAP system.RfcConnectionManager(SAPSystem sapSystem, String clientNumber, String language, Credential credential)Create an RFC connection manager for the given SAP system.RfcConnectionManager(SAPSystem sapSystem, String clientNumber, String user, String password)Create an RFC connection manager for the given SAP system.RfcConnectionManager(SAPSystem sapSystem, String clientNumber, String user, String password, String language)Create an RFC connection manager for the given SAP system.RfcConnectionManager(SchedulerSession session, String sapSystemName)Create an RFC connection manager for the given SAP system name.RfcConnectionManager(SchedulerSession session, String sapSystemName, String clientNumber)Create an RFC connection manager for the given SAP system name.RfcConnectionManager(SchedulerSession session, String sapSystemName, String clientNumber, Credential credential)Create an RFC connection manager for the given SAP system.RfcConnectionManager(SchedulerSession session, String sapSystemName, String clientNumber, String language)Create an RFC connection manager for the given SAP system name.RfcConnectionManager(SchedulerSession session, String sapSystemName, String clientNumber, String language, Credential credential)Create an RFC connection manager for the given SAP system.RfcConnectionManager(SchedulerSession session, String sapSystemName, String clientNumber, String user, String password)Create an RFC connection manager for the given SAP system.RfcConnectionManager(SchedulerSession session, String sapSystemName, String clientNumber, String user, String password, String language)Create an RFC connection manager for the given SAP system.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidcallRFC(RfcWork rfcWork)Establish an RFC connection and execute the script.voidcallXBP(XbpWork xbpWork)Establish an RFC connection, login to the XBP interface and execute the script.voidcallXBP(XbpWork xbpWork, String xbpVersion)Deprecated.use (@link callXbp} instead, xbpVersion is not set, the interface uses the highest version availablestatic SAPSystemgetSapSystem(SchedulerSession session, String sapSystemName)Fetches theSAPSystemwith the given businessKey.static SAPXBPgetXBPClient(SAPSystem sapSystem, String clientNumber)Returns theSAPXBPclient for the given SAP system and client numbervoidsetMaxReconnectTime(long newMaxReconnectTime)Change default reconnect time
 
- 
- 
- 
Constructor Detail- 
RfcConnectionManagerpublic RfcConnectionManager(SAPSystem sapSystem) Create an RFC connection manager for the given SAP system. Settings of the default client will be used to establish the RFC connection.- Parameters:
- sapSystem- SAP system to connect to
 
 - 
RfcConnectionManagerpublic RfcConnectionManager(SAPSystem sapSystem, String clientNumber) Create an RFC connection manager for the given SAP system. Settings of the given client will be used to establish the RFC connection.- Parameters:
- sapSystem- SAP system to connect to
- clientNumber- client number to use
 
 - 
RfcConnectionManagerpublic RfcConnectionManager(SAPSystem sapSystem, String clientNumber, Credential credential) Create an RFC connection manager for the given SAP system. The RFC connection will be established using the given client and credential.- Parameters:
- sapSystem- SAP system to connect to
- clientNumber- client number to use
- credential- credential with protocol- SAP_RFC
 
 - 
RfcConnectionManagerpublic RfcConnectionManager(SAPSystem sapSystem, String clientNumber, String language) Create an RFC connection manager for the given SAP system. Settings of the given client will be used to establish the RFC connection.- Parameters:
- sapSystem- SAP system to connect to
- clientNumber- client number to use
- language- language
 
 - 
RfcConnectionManagerpublic RfcConnectionManager(SAPSystem sapSystem, String clientNumber, String language, Credential credential) Create an RFC connection manager for the given SAP system. The RFC connection will be established using the given client and credential.- Parameters:
- sapSystem- SAP system to connect to
- clientNumber- client number to use
- language- language
- credential- credential with protocol- SAP_RFC
 
 - 
RfcConnectionManagerpublic RfcConnectionManager(SAPSystem sapSystem, String clientNumber, String user, String password) Create an RFC connection manager for the given SAP system. Settings of the given client, user name and password will be used to establish the RFC connection.- Parameters:
- sapSystem- SAP system to connect to
- clientNumber- client number to use
- user- SAP user name
- password- password
 
 - 
RfcConnectionManagerpublic RfcConnectionManager(SAPSystem sapSystem, String clientNumber, String user, String password, String language) Create an RFC connection manager for the given SAP system. Settings of the given client, user name and password will be used to establish the RFC connection.- Parameters:
- sapSystem- SAP system to connect to
- clientNumber- client number to use
- user- user name
- password- password
- language- language
 
 - 
RfcConnectionManagerpublic RfcConnectionManager(SchedulerSession session, String sapSystemName) Create an RFC connection manager for the given SAP system name. Settings of the default client will be used to establish the RFC connection.- Parameters:
- session- scheduler session to retrieve the SAP system object
- sapSystemName- name of SAP system to connect to.
 
 - 
RfcConnectionManagerpublic RfcConnectionManager(SchedulerSession session, String sapSystemName, String clientNumber) Create an RFC connection manager for the given SAP system name. Settings of the given client will be used to establish the RFC connection.- Parameters:
- session- scheduler session to retrieve the SAP system object
- sapSystemName- name of SAP system to connect to.
- clientNumber- client number to use
 
 - 
RfcConnectionManagerpublic RfcConnectionManager(SchedulerSession session, String sapSystemName, String clientNumber, Credential credential) Create an RFC connection manager for the given SAP system. The RFC connection will be established using the given client and credential.- Parameters:
- session- scheduler session to retrieve the SAP system object
- sapSystemName- name of SAP system to connect to.
- clientNumber- client number to use
- credential- credential with protocol- SAP_RFC
 
 - 
RfcConnectionManagerpublic RfcConnectionManager(SchedulerSession session, String sapSystemName, String clientNumber, String language) Create an RFC connection manager for the given SAP system name. Settings of the given client will be used to establish the RFC connection.- Parameters:
- session- scheduler session to retrieve the SAP system object
- sapSystemName- name of SAP system to connect to.
- clientNumber- client number to use
- language- language
 
 - 
RfcConnectionManagerpublic RfcConnectionManager(SchedulerSession session, String sapSystemName, String clientNumber, String language, Credential credential) Create an RFC connection manager for the given SAP system. The RFC connection will be established using the given client and credential.- Parameters:
- session- scheduler session to retrieve the SAP system object
- sapSystemName- name of SAP system to connect to.
- clientNumber- client number to use
- language- language
- credential- credential with protocol- SAP_RFC
 
 - 
RfcConnectionManagerpublic RfcConnectionManager(SchedulerSession session, String sapSystemName, String clientNumber, String user, String password) Create an RFC connection manager for the given SAP system. Settings of the given client, user name and password will be used to establish the RFC connection.- Parameters:
- session- scheduler session to retrieve the SAP system object
- sapSystemName- name of SAP system to connect to.
- clientNumber- client number to use
- user- user name
- password- password
 
 - 
RfcConnectionManagerpublic RfcConnectionManager(SchedulerSession session, String sapSystemName, String clientNumber, String user, String password, String language) Create an RFC connection manager for the given SAP system. Settings of the given client, user name and password will be used to establish the RFC connection.- Parameters:
- session- scheduler session to retrieve the SAP system object
- sapSystemName- name of SAP system to connect to.
- clientNumber- client number to use
- user- user name
- password- password
- language- language
 
 
- 
 - 
Method Detail- 
getSapSystempublic static SAPSystem getSapSystem(SchedulerSession session, String sapSystemName) Fetches theSAPSystemwith the given businessKey.- Parameters:
- session- the- SchedulerSessionto use to do the lookup.
- sapSystemName- the businessKey of the- SAPSystem
- Returns:
- the SAPSystemwith the given name.
 
 - 
getXBPClientpublic static SAPXBP getXBPClient(SAPSystem sapSystem, String clientNumber) Returns theSAPXBPclient for the given SAP system and client number
 - 
callRFCpublic void callRFC(RfcWork rfcWork) Establish an RFC connection and execute the script.- Parameters:
- rfcWork-
 
 - 
callXBPpublic void callXBP(XbpWork xbpWork) Establish an RFC connection, login to the XBP interface and execute the script. The version of the XBP interface will be taken from the SAP system, or determined automatically. NOTE: only XBP version 1.0 or higher is supported- Parameters:
- xbpWork-
 
 - 
callXBP@Deprecated public void callXBP(XbpWork xbpWork, String xbpVersion) Deprecated.use (@link callXbp} instead, xbpVersion is not set, the interface uses the highest version availableEstablish an RFC connection, login to the XBP interface with the given version and execute the script NOTE: only XBP version 1.0 or higher is supported- Parameters:
- xbpWork-
- xbpVersion-
 
 - 
setMaxReconnectTimepublic void setMaxReconnectTime(long newMaxReconnectTime) Change default reconnect time- Parameters:
- newMaxReconnectTime- max reconnect time in seconds. If less than zero, then no reconnect will tried, when zero, then reconnect will be tried indefinitely, otherwise reconnect will be tried for the given number of seconds
 
 
- 
 
-