public class ConnectionImpl extends Object implements Connection
TPCONV, TPEBADDESC, TPEBLOCK, TPEEVENT, TPEINVAL, TPEITYPE, TPELIMIT, TPEMATCH, TPENOENT, TPEOS, TPEOTYPE, TPEPROTO, TPESVCERR, TPESVCFAIL, TPESYSTEM, TPETIME, TPETRAN, TPEV_DISCONIMM, TPEV_SENDONLY, TPEV_SVCERR, TPEV_SVCFAIL, TPEV_SVCSUCC, TPFAIL, TPGETANY, TPGOTSIG, TPNOBLOCK, TPNOCHANGE, TPNOREPLY, TPNOTIME, TPNOTRAN, TPRECVONLY, TPSENDONLY, TPSIGRSTRT, TPSUCCESS, TPTRAN, XATMI_SERVICE_NAME_LENGTH| Constructor and Description |
|---|
ConnectionImpl(ConnectionFactory connectionFactory,
Properties properties)
The connection
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close any resources associated with this connection
|
SessionImpl |
createServiceSession(String name,
int cd,
Object replyTo)
Used by the service side to create a session for handling the client
request.
|
boolean |
hasOpenSessions()
Does this connection have any open sessions? Used to determine if a
service has unanswered requests prior to a tpreturn.
|
int |
tpacall(String svc,
Buffer toSend,
int flags)
Asynchronous call
|
Buffer |
tpalloc(String type,
String subtype)
Allocate a new buffer
|
Response |
tpcall(String svc,
Buffer buffer,
int flags)
Synchronous call.
|
int |
tpcancel(int cd)
Cancel the outstanding asynchronous call.
|
Session |
tpconnect(String svc,
Buffer toSend,
int flags)
Handle the initiation of a conversation with the server.
|
Response |
tpgetrply(int cd,
int flags)
Get the reply for an asynchronous call.
|
public ConnectionImpl(ConnectionFactory connectionFactory, Properties properties) throws org.jboss.narayana.blacktie.jatmibroker.core.conf.ConfigurationException
connectionFactory - The connection factory that created this connection.properties - The properties that this connection was created with.org.jboss.narayana.blacktie.jatmibroker.core.conf.ConfigurationExceptionpublic Buffer tpalloc(String type, String subtype) throws ConnectionException, org.jboss.narayana.blacktie.jatmibroker.core.conf.ConfigurationException
tpalloc in interface Connectiontype - The type of the buffersubtype - The subtype of the bufferConnectionException - If the buffer was unknown or invalid.org.jboss.narayana.blacktie.jatmibroker.core.conf.ConfigurationExceptionpublic Response tpcall(String svc, Buffer buffer, int flags) throws ConnectionException, org.jboss.narayana.blacktie.jatmibroker.core.conf.ConfigurationException
tpcall in interface Connectionsvc - The name of the service to callbuffer - The inbound dataflags - The flags to useConnectionException - If the service cannot be contacted.org.jboss.narayana.blacktie.jatmibroker.core.conf.ConfigurationExceptionpublic int tpacall(String svc, Buffer toSend, int flags) throws ConnectionException
tpacall in interface Connectionsvc - The name of the service to calltoSend - The inbound dataflags - The flags to useConnectionException - If the service cannot be contacted.public int tpcancel(int cd)
throws ConnectionException
tpcancel in interface Connectioncd - The connection descriptorConnectionException - If the client cannot be cleaned up.public Response tpgetrply(int cd, int flags) throws ConnectionException, org.jboss.narayana.blacktie.jatmibroker.core.conf.ConfigurationException
tpgetrply in interface Connectioncd - The connection descriptor to useflags - The flags to useConnectionException - If the service cannot be contacted.org.jboss.narayana.blacktie.jatmibroker.core.conf.ConfigurationExceptionpublic Session tpconnect(String svc, Buffer toSend, int flags) throws ConnectionException
tpconnect in interface Connectionsvc - The name of the servicetoSend - The outbound bufferflags - The flags to useConnectionException - If the service cannot be contacted.public void close()
throws ConnectionException
close in interface ConnectionConnectionException - If an open session cannot be cancelled or disconnected.public SessionImpl createServiceSession(String name, int cd, Object replyTo) throws ConnectionException
name - The name of the service.cd - The connection descriptorreplyTo - The client to respond toConnectionException - In case the transport cannot be established.public boolean hasOpenSessions()
Copyright © 2016 JBoss by Red Hat. All Rights Reserved.