Conversational methods group
◆ tpconnect()
native int org.endurox.AtmiCtx.tpconnect |
( |
String |
svc, |
|
|
TypedBuffer |
idata, |
|
|
long |
flags |
|
) |
| |
Connect to XATMI conversational server See tpconnect(3) manpage for more information.
- Parameters
-
svc | service name |
idata | input XATMI buffer |
flags | AtmiConst flags - TPNOTRAN, TPSIGRSTRT, TPNOTIME, TPTRANSUSPEND, TPSENDONLY, TPRECVONLY. Binary or'able. |
- Returns
- connection descriptor (cd)
- Exceptions
-
AtmiTPEINVALException | Invalid parameter is given to function. Either service name is NULL or data is not NULL, but not allocated by tpalloc() |
AtmiTPENOENTException | No service (svc parameter) advertised in system. |
AtmiTPELIMITException | Max number of connections are reached. Currently max number of connections is limited to 5 (MAX_CONNECTIONS macro). |
AtmiTPETIMEException | Service did not reply in given time (NDRX_TOUT). |
AtmiTPESVCFAILException | Service returned TPFAIL. This is application level failure. |
AtmiTPESVCERRException | System level service failure. Server died during the message presence in service queue. |
AtmiTPESYSTEMException | System failure occurred during serving. See logs i.e. user log, or debugs for more info. |
AtmiTPEOSException | System failure occurred during serving. See logs i.e. user log, or debugs for more info. |
◆ tpdiscon()
native void org.endurox.AtmiCtx.tpdiscon |
( |
int |
cd | ) |
|
Disconnect from conversation
- Parameters
-
cd | conversation descriptor / id |
- Exceptions
-
AtmiTPEINVALException | Invalid connection descriptor passed in. |
AtmiTPEOSException | System failure occurred during serving. See logs i.e. user log, or debugs for more info. |
◆ tprecv()
Received data from endpoint
- Parameters
-
cd | conversation id |
idata | input data buffer into which received data shall be stored. This object becomes invalid after the call, new instance is provided in return object. The data type may be changed of the buffer. |
flags | TPRECVONLY, TPNOBLOCK, TPSIGRSTRT, TPNOBLOCK |
- Returns
- Receive result (event, cd, typed buffer). Possible event constants: TPEV_DISCONIMM, TPEV_SENDONLY, TPEV_SVCERR, TPEV_SVCFAIL, TPEV_SVCSUCC
- Exceptions
-
AtmiTPEINVALException | Invalid call descriptor cd passed in. |
AtmiTPETIMEException | Service did not reply in given time (NDRX_TOUT). |
AtmiTPEPROTOException | System level service failure. Server died during the message presence in service queue. |
AtmiTPESYSTEMException | System failure occurred during serving. See logs i.e. user log, or debugs for more info. |
AtmiTPEOSException | System failure occurred during serving. See logs i.e. user log, or debugs for more info. |
◆ tpsend()
native long org.endurox.AtmiCtx.tpsend |
( |
int |
cd, |
|
|
TypedBuffer |
idata, |
|
|
long |
flags |
|
) |
| |
Send data to conversational endpoint See tpsend(3) manpage for more information.
- Parameters
-
cd | conversation descriptor |
idata | input data buffer. Data buffer is valid after the call |
flags | TPRECVONLY, TPNOBLOCK, TPSIGRSTRT |
- Returns
- receive event. If sent ok w/o event, then return code is 0. Event constants: TPEV_SVCERR, TPEV_SVCFAIL
- Exceptions
-
AtmiTPEINVALException | Invalid call descriptor cd passed in or data pointer is not pointing to buffer allocated by tpalloc(). |
AtmiTPETIMEException | Was unable to send message in given time(NDRX_TOUT env param.). |
AtmiTPESYSTEMException | System failure occurred during serving. See logs i.e. user log, or debugs for more info. |
AtmiTPEOSException | System failure occurred during serving. See logs i.e. user log, or debugs for more info. |