org.jboss.narayana.blacktie.jatmibroker.xatmi
Class Session

java.lang.Object
  extended by org.jboss.narayana.blacktie.jatmibroker.xatmi.Session

public class Session
extends Object

A session reference may either be obtained from the tpconnect Connection invocation for a client or retrieved from the TPSVCINFO structure for a service (assuming the service was invoked within the scope of a tpconnect). It is used to send and retrieve data

See Also:
Connection#tpconnect(String, Buffer, int, int), TPSVCINFO.getSession()

Method Summary
 void tpdiscon()
          Close the conversation with the remote service.
 Buffer tprecv(int flags)
          Received the next response in a conversation
 int tpsend(Buffer toSend, int flags)
          Send a buffer to a remote server in a conversation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

tpsend

public int tpsend(Buffer toSend,
                  int flags)
           throws ConnectionException
Send a buffer to a remote server in a conversation

Parameters:
toSend - The outbound data
len - The length of the data
flags - The flags to use
Throws:
ConnectionException - If the message cannot be sent.

tprecv

public Buffer tprecv(int flags)
              throws ConnectionException
Received the next response in a conversation

Parameters:
flags - The flags to use
Returns:
The next response
Throws:
ConnectionException - If the message cannot be received or the flags are incorrect

tpdiscon

public void tpdiscon()
              throws ConnectionException
Close the conversation with the remote service. This will close the session.

Throws:
ConnectionException


Copyright © 2011. All Rights Reserved.