endurox-java
Functions
conversational methods

Functions

native int org.endurox.AtmiCtx.tpconnect (String svc, TypedBuffer idata, long flags)
 
native long org.endurox.AtmiCtx.tpsend (int cd, TypedBuffer idata, long flags)
 
native TprecvResult org.endurox.AtmiCtx.tprecv (int cd, TypedBuffer idata, long flags)
 
native void org.endurox.AtmiCtx.tpdiscon (int cd)
 

Detailed Description

Conversational methods group

Function Documentation

◆ 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
svcservice name
idatainput XATMI buffer
flagsAtmiConst flags - TPNOTRAN, TPSIGRSTRT, TPNOTIME, TPTRANSUSPEND, TPSENDONLY, TPRECVONLY. Binary or'able.
Returns
connection descriptor (cd)
Exceptions
AtmiTPEINVALExceptionInvalid parameter is given to function. Either service name is NULL or data is not NULL, but not allocated by tpalloc()
AtmiTPENOENTExceptionNo service (svc parameter) advertised in system.
AtmiTPELIMITExceptionMax number of connections are reached. Currently max number of connections is limited to 5 (MAX_CONNECTIONS macro).
AtmiTPETIMEExceptionService did not reply in given time (NDRX_TOUT).
AtmiTPESVCFAILExceptionService returned TPFAIL. This is application level failure.
AtmiTPESVCERRExceptionSystem level service failure. Server died during the message presence in service queue.
AtmiTPESYSTEMExceptionSystem failure occurred during serving. See logs i.e. user log, or debugs for more info.
AtmiTPEOSExceptionSystem 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
cdconversation descriptor / id
Exceptions
AtmiTPEINVALExceptionInvalid connection descriptor passed in.
AtmiTPEOSExceptionSystem failure occurred during serving. See logs i.e. user log, or debugs for more info.

◆ tprecv()

native TprecvResult org.endurox.AtmiCtx.tprecv ( int  cd,
TypedBuffer  idata,
long  flags 
)

Received data from endpoint

Parameters
cdconversation id
idatainput 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.
flagsTPRECVONLY, TPNOBLOCK, TPSIGRSTRT, TPNOBLOCK
Returns
Receive result (event, cd, typed buffer). Possible event constants: TPEV_DISCONIMM, TPEV_SENDONLY, TPEV_SVCERR, TPEV_SVCFAIL, TPEV_SVCSUCC
Exceptions
AtmiTPEINVALExceptionInvalid call descriptor cd passed in.
AtmiTPETIMEExceptionService did not reply in given time (NDRX_TOUT).
AtmiTPEPROTOExceptionSystem level service failure. Server died during the message presence in service queue.
AtmiTPESYSTEMExceptionSystem failure occurred during serving. See logs i.e. user log, or debugs for more info.
AtmiTPEOSExceptionSystem 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
cdconversation descriptor
idatainput data buffer. Data buffer is valid after the call
flagsTPRECVONLY, TPNOBLOCK, TPSIGRSTRT
Returns
receive event. If sent ok w/o event, then return code is 0. Event constants: TPEV_SVCERR, TPEV_SVCFAIL
Exceptions
AtmiTPEINVALExceptionInvalid call descriptor cd passed in or data pointer is not pointing to buffer allocated by tpalloc().
AtmiTPETIMEExceptionWas unable to send message in given time(NDRX_TOUT env param.).
AtmiTPESYSTEMExceptionSystem failure occurred during serving. See logs i.e. user log, or debugs for more info.
AtmiTPEOSExceptionSystem failure occurred during serving. See logs i.e. user log, or debugs for more info.