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.JCoServerTIDHandlerClass 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.StringJCO_SERVER_DESTprotected com.ibm.icu.text.SimpleDateFormattimestampFormat
-
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 booleancheckTID(com.sap.conn.jco.server.JCoServerContext arg0, java.lang.String tid)voidcommit(com.sap.conn.jco.server.JCoServerContext arg0, java.lang.String arg1)voidconfirmTID(com.sap.conn.jco.server.JCoServerContext arg0, java.lang.String tid)com.sap.conn.idoc.jco.JCoIDocServergetServer()protected voidhandleRequest(com.sap.conn.jco.JCoFunction function)Overridden method of JCoIDoc.Server.voidhandleRequest(com.sap.conn.jco.server.JCoServerContext serverCtx, com.sap.conn.idoc.IDocDocumentList documentList)Overridden method of JCoIDoc.Server.protected java.lang.StringiDoctoXML(com.sap.conn.idoc.IDocDocument doc)protected booleanonCheckTID(java.lang.String tid)Overridden method of JCoIDoc.Server.protected voidonConfirmTID(java.lang.String tid)Overridden method of JCoIDoc.Server.voidrollback(com.sap.conn.jco.server.JCoServerContext arg0, java.lang.String arg1)voidsetTrace(boolean b)voidstart()voidstop()voidsuspend()voidunregister()protected EntrywriteIDocToTDIEntry(java.lang.String tid, com.sap.conn.idoc.IDocDocument jcoIDoc)Processes a particular IDoc for a particular SAP client transaction.protected EntrywriteRFMToTDIEntry(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:
handleRequestin 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:
checkTIDin interfacecom.sap.conn.jco.server.JCoServerTIDHandler
-
commit
public void commit(com.sap.conn.jco.server.JCoServerContext arg0, java.lang.String arg1)- Specified by:
commitin interfacecom.sap.conn.jco.server.JCoServerTIDHandler
-
confirmTID
public void confirmTID(com.sap.conn.jco.server.JCoServerContext arg0, java.lang.String tid)- Specified by:
confirmTIDin interfacecom.sap.conn.jco.server.JCoServerTIDHandler
-
rollback
public void rollback(com.sap.conn.jco.server.JCoServerContext arg0, java.lang.String arg1)- Specified by:
rollbackin interfacecom.sap.conn.jco.server.JCoServerTIDHandler
-
setTrace
public void setTrace(boolean b)
-
unregister
public void unregister()
-
-