Class ConnectionDelegator
java.lang.Object
de.hybris.platform.sap.core.jco.rec.impl.ConnectionDelegator
- All Implemented Interfaces:
JCoConnection,JCoStateful
The JCoRecorder equivalent to the
JCoConnectionImpl.-
Field Summary
Fields inherited from interface de.hybris.platform.sap.core.jco.connection.JCoConnection
JCO_DESTINATION, JCO_LANG, JCO_SCOPE_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionConnectionDelegator(JCoConnection connection, JCoRecMode mode, RepositoryPlayback repoPlayback, RepositoryRecording repoRecording) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Gets called if connection should be destroyed.voidexecute(com.sap.conn.jco.JCoFunction function) This method is used to execute a JCoFunction on behalf of this connection.com.sap.conn.jco.JCoFunctiongetFunction(String functionName) Returns a JCoFunction object for the given function name.booleanReturnstrueif the backend is available the connection is connected to.booleanReturnstrueif the backend is switched offline the connection is connected to.booleanisFunctionAvailable(String functionName) Returnstrueif the JCo Function is available on the SAP system the connection is connected to.voidsetCallerId(String callerID) Sets the caller id.
-
Constructor Details
-
ConnectionDelegator
public ConnectionDelegator(JCoConnection connection, JCoRecMode mode, RepositoryPlayback repoPlayback, RepositoryRecording repoRecording) Constructor.- Parameters:
connection- the delegated Connection.mode- the mode of the recorder.repoPlayback- the RepositoryPlayback instance.repoRecording- the RepositoryRecording instance.
-
-
Method Details
-
getFunction
Description copied from interface:JCoConnectionReturns a JCoFunction object for the given function name.- Specified by:
getFunctionin interfaceJCoConnection- Parameters:
functionName- name of remote callable function module on the SAP system- Returns:
- JCoFunction
- Throws:
BackendException- when something goes wrong while retrieving meta data
-
execute
Description copied from interface:JCoConnectionThis method is used to execute a JCoFunction on behalf of this connection.- Specified by:
executein interfaceJCoConnection- Parameters:
function- a JCoFunction which should be executed- Throws:
BackendException- thrown if something goes wrong in the EAI layer or if an JCoException is thrown by the SAP Java Connector.
-
isFunctionAvailable
Description copied from interface:JCoConnectionReturnstrueif the JCo Function is available on the SAP system the connection is connected to.- Specified by:
isFunctionAvailablein interfaceJCoConnection- Parameters:
functionName- function name- Returns:
trueif the JCo Function is available, otherwisefalse- Throws:
BackendException-BackendException
-
setCallerId
Description copied from interface:JCoConnectionSets the caller id.- Specified by:
setCallerIdin interfaceJCoConnection- Parameters:
callerID- caller id.
-
isBackendOffline
Description copied from interface:JCoConnectionReturnstrueif the backend is switched offline the connection is connected to.- Specified by:
isBackendOfflinein interfaceJCoConnection- Returns:
trueif the backend is switched offline, otherwisefalse- Throws:
BackendException-BackendException
-
isBackendAvailable
Description copied from interface:JCoConnectionReturnstrueif the backend is available the connection is connected to.- Specified by:
isBackendAvailablein interfaceJCoConnection- Returns:
trueif the backend is available, otherwisefalse- Throws:
BackendException-BackendException
-
destroy
Description copied from interface:JCoStatefulGets called if connection should be destroyed.- Specified by:
destroyin interfaceJCoStateful- Throws:
BackendException- in case of failure.
-