Class ConnectionDelegator
- java.lang.Object
-
- de.hybris.platform.sap.core.jco.rec.impl.ConnectionDelegator
-
- All Implemented Interfaces:
JCoConnection,JCoStateful
public class ConnectionDelegator extends java.lang.Object implements JCoConnection, JCoStateful
The JCoRecorder equivalent to theJCoConnectionImpl.
-
-
Field Summary
-
Fields inherited from interface de.hybris.platform.sap.core.jco.connection.JCoConnection
JCO_DESTINATION, JCO_LANG, JCO_SCOPE_TYPE
-
-
Constructor Summary
Constructors Constructor Description ConnectionDelegator(JCoConnection connection, JCoRecMode mode, RepositoryPlayback repoPlayback, RepositoryRecording repoRecording)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()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(java.lang.String functionName)Returns a JCoFunction object for the given function name.booleanisBackendAvailable()Returnstrueif the backend is available the connection is connected to.booleanisBackendOffline()Returnstrueif the backend is switched offline the connection is connected to.booleanisFunctionAvailable(java.lang.String functionName)Returnstrueif the JCo Function is available on the SAP system the connection is connected to.voidsetCallerId(java.lang.String callerID)Sets the caller id.
-
-
-
Constructor Detail
-
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 Detail
-
getFunction
public com.sap.conn.jco.JCoFunction getFunction(java.lang.String functionName) throws BackendExceptionDescription 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
public void execute(com.sap.conn.jco.JCoFunction function) throws BackendExceptionDescription 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
public boolean isFunctionAvailable(java.lang.String functionName) throws BackendExceptionDescription 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
public void setCallerId(java.lang.String callerID)
Description copied from interface:JCoConnectionSets the caller id.- Specified by:
setCallerIdin interfaceJCoConnection- Parameters:
callerID- caller id.
-
isBackendOffline
public boolean isBackendOffline() throws BackendExceptionDescription 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
public boolean isBackendAvailable() throws BackendExceptionDescription 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
public void destroy() throws BackendExceptionDescription copied from interface:JCoStatefulGets called if connection should be destroyed.- Specified by:
destroyin interfaceJCoStateful- Throws:
BackendException- in case of failure.
-
-