Class SapIDocServerImpl
- java.lang.Object
-
- com.sap.mw.jco.JCO.Connection
-
- com.sap.mw.jco.JCO.Server
-
- com.sap.mw.idoc.jco.JCoIDoc.Server
-
- com.ibm.di.connector.sapr3.aleidoc.SapIDocServerImpl
-
- All Implemented Interfaces:
java.lang.Cloneable,java.lang.Runnable
public class SapIDocServerImpl extends com.sap.mw.idoc.jco.JCoIDoc.ServerClass SapIDocServerImpl is for receiving IDoc and function requests. This is the actual JCo IDoc Server implementation for the Connector and manages the receiving of IDoc and Remote Function Module requests, and also the TID Management for the received requests if applicable.
-
-
Field Summary
Fields Modifier and Type Field Description protected com.ibm.icu.text.SimpleDateFormattimestampFormat-
Fields inherited from class com.sap.mw.jco.JCO.Server
AUTHORIZATION_MODE_BASIC, AUTHORIZATION_MODE_SNC, FUNCTION_MODEL, m_middleware, REQUEST_RESPONSE_MODEL
-
Fields inherited from class com.sap.mw.jco.JCO.Connection
attributes, codepage_converter, conn_object, conn_params, connection_cpc_mode, dsr_monitor, jarm_monitor, last_active_timestamp, num_received_bytes, num_sent_bytes, passport_bytes, pool, properties, rfc_handle, rfm_name, start_time, state, throughput, time_handle_request, time_middleware, time_total
-
-
Constructor Summary
Constructors Constructor Description SapIDocServerImpl(SapALEIDocConnector conn, java.lang.String gwhost, java.lang.String gwserv, java.lang.String progid, com.sap.mw.jco.IRepository jcoRepository, com.sap.mw.idoc.IDoc.Repository idocRepository)Constructor of JCoIDoc.Server that takes RFC Server connection parameters directly.SapIDocServerImpl(SapALEIDocConnector conn, java.util.Properties properties, com.sap.mw.jco.IRepository jcoRepository, com.sap.mw.idoc.IDoc.Repository idocRepository)Constructor of JCoIDoc.Server that takes RFC Server connection parameters contained within a properties object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidhandleRequest(com.sap.mw.idoc.IDoc.DocumentList documentList)Overridden method of JCoIDoc.Server.protected voidhandleRequest(com.sap.mw.jco.JCO.Function function)Overridden method of JCoIDoc.Server.protected booleanonCheckTID(java.lang.String tid)Overridden method of JCoIDoc.Server.protected voidonConfirmTID(java.lang.String tid)Overridden method of JCoIDoc.Server.protected EntrywriteIDocToTDIEntry(java.lang.String tid, com.sap.mw.idoc.IDoc.Document jcoIDoc)Processes a particular IDoc for a particular SAP client transaction.protected EntrywriteRFMToTDIEntry(java.lang.String tid, com.sap.mw.jco.JCO.Function function)Processes a particular RFM for a particular SAP client transaction.-
Methods inherited from class com.sap.mw.idoc.jco.JCoIDoc.Server
dispatchRequest, getFunction, getIDocRepository, setIDocRepository
-
Methods inherited from class com.sap.mw.jco.JCO.Server
abort, beginCall, checkAuthorization, disconnect, endCall, getAttributes, getCallModel, getDsrPassport, getGWHost, getGWServ, getMiddlewareImplementation, getProgID, getPropertyInfo, getRepository, getServerInterface, getState, getThread, getTrace, handleRequest, isAlive, listen, onCommit, onRollback, run, setCallModel, setProperty, setRepository, setState, setThread, setTrace, start, stop, suspend
-
-
-
-
Constructor Detail
-
SapIDocServerImpl
public SapIDocServerImpl(SapALEIDocConnector conn, java.lang.String gwhost, java.lang.String gwserv, java.lang.String progid, com.sap.mw.jco.IRepository jcoRepository, com.sap.mw.idoc.IDoc.Repository idocRepository)
Constructor of JCoIDoc.Server that takes RFC Server connection parameters directly.
-
SapIDocServerImpl
public SapIDocServerImpl(SapALEIDocConnector conn, java.util.Properties properties, com.sap.mw.jco.IRepository jcoRepository, com.sap.mw.idoc.IDoc.Repository idocRepository)
Constructor of JCoIDoc.Server that takes RFC Server connection parameters contained within a properties object.
-
-
Method Detail
-
onCheckTID
protected boolean onCheckTID(java.lang.String tid)
Overridden method of JCoIDoc.Server. Forms the initial call made on the Server for the TID management cycle. Expected to follow are calls on handleRequest() and then onConfirmTID() to complete the TID management life cycle.- Overrides:
onCheckTIDin classcom.sap.mw.jco.JCO.Server- Parameters:
tid- - The SAP client transaction identifier.
-
onConfirmTID
protected void onConfirmTID(java.lang.String tid)
Overridden method of JCoIDoc.Server. Forms the final call made on the Server for the TID management cycle. Expected that calls on onCheckTID() and handleRequest() have already been processed as part of the TID management life cycle.- Overrides:
onConfirmTIDin classcom.sap.mw.jco.JCO.Server- Parameters:
tid- - The SAP client transaction identifier.
-
handleRequest
protected void handleRequest(com.sap.mw.idoc.IDoc.DocumentList documentList)
Overridden method of JCoIDoc.Server. Forms the intermediate call made on the Server for the TID management cycle. Expected that calls on onCheckTID() has already been processed as part of the TID management life cycle. Therefore the list of IDocs received by this invokation belong to the last received TID stored when onCheckTID() was called.- Overrides:
handleRequestin classcom.sap.mw.idoc.jco.JCoIDoc.Server- Parameters:
documentList- - The list of IDocs for a particular SAP client transaction.
-
writeIDocToTDIEntry
protected Entry writeIDocToTDIEntry(java.lang.String tid, com.sap.mw.idoc.IDoc.Document jcoIDoc)
Processes a particular IDoc for a particular SAP client transaction. The result is a TDI Entry that represents the SAP ALE IDoc.- Parameters:
tid- - The SAP client transaction identifier.jcoIDoc- - IDoc to be processed for a particular SAP client transaction.- Returns:
- - A TDI Entry that represents the SAP ALE IDoc.
-
handleRequest
protected void handleRequest(com.sap.mw.jco.JCO.Function function)
Overridden method of JCoIDoc.Server. Function requests that do not contain IDocs will be handled here. These requests will be stored as XML file in the incoming path. No other action will be done. The return parameters won't be filled and no exception will be thrown to the caller. Future releases of the connector may implement certain function modules as required within this methods internal method invokations.- Overrides:
handleRequestin classcom.sap.mw.jco.JCO.Server- Parameters:
function- - The remote function call to be processed.
-
writeRFMToTDIEntry
protected Entry writeRFMToTDIEntry(java.lang.String tid, com.sap.mw.jco.JCO.Function function)
Processes a particular RFM for a particular SAP client transaction. The result is a TDI Entry that represents the SAP RFM. If a TID is not known then a default TID will have been assigned to fit within the TID Management functionality.- Parameters:
tid- - The SAP client transaction identifier.function- - RFM to be processed for a particular SAP client transaction.- Returns:
- - A TDI Entry that represents the SAP ALE IDoc.
-
-