Class SapIDocServerImplV3
- java.lang.Object
-
- com.ibm.di.connector.sapr3.aleidocv3.SapIDocServerImplV3
-
- All Implemented Interfaces:
com.sap.conn.idoc.jco.JCoIDocHandler
,com.sap.conn.jco.server.JCoServerTIDHandler
public class SapIDocServerImplV3 extends java.lang.Object implements com.sap.conn.idoc.jco.JCoIDocHandler, com.sap.conn.jco.server.JCoServerTIDHandler
Class 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 static java.lang.String
JCO_SERVER_DEST
protected com.ibm.icu.text.SimpleDateFormat
timestampFormat
-
Constructor Summary
Constructors Constructor Description SapIDocServerImplV3(SapALEIDocConnectorV3 conn, java.util.Properties properties, com.sap.conn.jco.JCoRepository jcoRepository, com.sap.conn.idoc.IDocRepository 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 boolean
checkTID(com.sap.conn.jco.server.JCoServerContext arg0, java.lang.String tid)
void
commit(com.sap.conn.jco.server.JCoServerContext arg0, java.lang.String arg1)
void
confirmTID(com.sap.conn.jco.server.JCoServerContext arg0, java.lang.String tid)
com.sap.conn.idoc.jco.JCoIDocServer
getServer()
protected void
handleRequest(com.sap.conn.jco.JCoFunction function)
Overridden method of JCoIDoc.Server.void
handleRequest(com.sap.conn.jco.server.JCoServerContext serverCtx, com.sap.conn.idoc.IDocDocumentList documentList)
Overridden method of JCoIDoc.Server.protected java.lang.String
iDoctoXML(com.sap.conn.idoc.IDocDocument doc)
protected boolean
onCheckTID(java.lang.String tid)
Overridden method of JCoIDoc.Server.protected void
onConfirmTID(java.lang.String tid)
Overridden method of JCoIDoc.Server.void
rollback(com.sap.conn.jco.server.JCoServerContext arg0, java.lang.String arg1)
void
setTrace(boolean b)
void
start()
void
stop()
void
suspend()
void
unregister()
protected Entry
writeIDocToTDIEntry(java.lang.String tid, com.sap.conn.idoc.IDocDocument jcoIDoc)
Processes a particular IDoc for a particular SAP client transaction.protected Entry
writeRFMToTDIEntry(java.lang.String tid, com.sap.conn.jco.JCoFunction function)
Processes a particular RFM for a particular SAP client transaction.
-
-
-
Field Detail
-
timestampFormat
protected final com.ibm.icu.text.SimpleDateFormat timestampFormat
-
JCO_SERVER_DEST
public static final java.lang.String JCO_SERVER_DEST
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SapIDocServerImplV3
public SapIDocServerImplV3(SapALEIDocConnectorV3 conn, java.util.Properties properties, com.sap.conn.jco.JCoRepository jcoRepository, com.sap.conn.idoc.IDocRepository idocRepository) throws com.sap.conn.jco.JCoException
Constructor of JCoIDoc.Server that takes RFC Server connection parameters contained within a properties object.- Throws:
com.sap.conn.jco.JCoException
-
-
Method Detail
-
getServer
public com.sap.conn.idoc.jco.JCoIDocServer getServer()
-
start
public void start()
-
stop
public void stop()
-
suspend
public void suspend()
-
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.- 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.- Parameters:
tid
- - The SAP client transaction identifier.
-
handleRequest
public void handleRequest(com.sap.conn.jco.server.JCoServerContext serverCtx, com.sap.conn.idoc.IDocDocumentList 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.- Specified by:
handleRequest
in interfacecom.sap.conn.idoc.jco.JCoIDocHandler
- Parameters:
documentList
- - The list of IDocs for a particular SAP client transaction.
-
iDoctoXML
protected java.lang.String iDoctoXML(com.sap.conn.idoc.IDocDocument doc)
-
writeIDocToTDIEntry
protected Entry writeIDocToTDIEntry(java.lang.String tid, com.sap.conn.idoc.IDocDocument 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.conn.jco.JCoFunction 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.- Parameters:
function
- - The remote function call to be processed.
-
writeRFMToTDIEntry
protected Entry writeRFMToTDIEntry(java.lang.String tid, com.sap.conn.jco.JCoFunction 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.
-
checkTID
public boolean checkTID(com.sap.conn.jco.server.JCoServerContext arg0, java.lang.String tid)
- Specified by:
checkTID
in interfacecom.sap.conn.jco.server.JCoServerTIDHandler
-
commit
public void commit(com.sap.conn.jco.server.JCoServerContext arg0, java.lang.String arg1)
- Specified by:
commit
in interfacecom.sap.conn.jco.server.JCoServerTIDHandler
-
confirmTID
public void confirmTID(com.sap.conn.jco.server.JCoServerContext arg0, java.lang.String tid)
- Specified by:
confirmTID
in interfacecom.sap.conn.jco.server.JCoServerTIDHandler
-
rollback
public void rollback(com.sap.conn.jco.server.JCoServerContext arg0, java.lang.String arg1)
- Specified by:
rollback
in interfacecom.sap.conn.jco.server.JCoServerTIDHandler
-
setTrace
public void setTrace(boolean b)
-
unregister
public void unregister()
-
-