public class TuxedoConnection extends Object implements ApplicationToMonitorInterface
TPABSOLUTE, TPACK, TPAPPAUTH, TPCONV, TPGETANY, TPNOAUTH, TPNOBLOCK, TPNOCHANGE, TPNOREPLY, TPNOTIME, TPNOTRAN, TPRECVONLY, TPRMICALL, TPSENDONLY, TPSIGRSTRT, TPSYSAUTH, TPTRAN, TPUNKAUTH| Modifier and Type | Method and Description | 
|---|---|
CallDescriptor | 
tpacall(String svc,
       TypedBuffer data,
       int flags)
This calls the other tpacall with null as the reply object 
 | 
CallDescriptor | 
tpacall(String svc,
       TypedBuffer data,
       int flags,
       TpacallAsyncReply callBack)
This implementation of tpacall is aware of the domain configuration
 files which correlate services with local and remote domains. 
 | 
Reply | 
tpcall(String svc,
      TypedBuffer data,
      int flags)
This implementation of tpcall looks up the proper service using the
 domain configuration files and/or MBeans. 
 | 
void | 
tpcancel(CallDescriptor cd,
        int flags)
This implementation knows about the tuxedo call descriptor and will attempt to
 cancel the outstanding tpacall request. 
 | 
Conversation | 
tpconnect(String svc,
         TypedBuffer data,
         int flags)
This implementation of tpconnect looks up the proper service using the
 domain configuration files and/or MBeans. 
 | 
DequeueReply | 
tpdequeue(String qspace,
         String qname,
         byte[] msgid,
         byte[] corrid,
         boolean doWait,
         boolean doPeek,
         int flags)
Much like tpacall, this looks up the remote qspace as a service offered
 through the domain configuration file, and once it has located the proper
 remote domain through which to send the dequeue request, it sends it. 
 | 
DequeueReply | 
tpdequeue(String qspace,
         String qname,
         int flags)
This is the simple version of tpdequeue, which is equalvalent to calling
 the other tpdequeue verb with null as the msgid and corrid and false as
 the values for doWait and doPeek. 
 | 
byte[] | 
tpenqueue(String qspace,
         String qname,
         EnqueueRequest ctl,
         TypedBuffer data,
         int flags)
Much like tpacall, this looks up the remote qspace as a service offered
 through the domain configuration file, and once it has located the proper
 remote domain through which to send the enqueue request, it sends it. 
 | 
Reply | 
tpgetrply(CallDescriptor cd,
         int flags)
This implementation does not yet handle the case of blocking replies
 with the TPGETANY flag. 
 | 
void | 
tpsprio(int prio,
       int flags)
Sets the priority for the next request sent or forwarded by the current
 thread in the current context. 
 | 
void | 
tpterm()
This should be called by applications when they are finished with
 operations on this object. 
 | 
public CallDescriptor tpacall(String svc, TypedBuffer data, int flags) throws TPException
tpacall in interface ApplicationToMonitorInterfacesvc - The name of the Tuxedo servicedata - Pointer to the data buffer; null specifies no data sentflags - svc is invoked, the call does not becoome part of the 
 caller's transaction. If svc belongs to a server that does not
 support transactions, this flag must be set when the caller is
 in transaction mode. Note that svc may still be invoked in
 transaction mode but it will not be the same transaction: a svc may
 have a configuration attribute that it is automatically invoked
 in transaction mode. A caller in transaction mode that sets this flag
 is still subject to the transaction timeout (and no other). If a
 service fails that was invoked with this flag, the caller's
 transaction is not affected.
 tpgetreply or
 tpcancel.TPException - Returns a TPException indicating the error condition.
 tperrno is set to one of the following values:svc is null 
 or flags are invalid.
 svc does not exist or is a 
 conversational service.
 data does not match the 
 type and sub-type expected by svc.
 svc belongs to a server that does not support transactions
 and TPNOTRAN was not set.
 tpacall with TPNOTRAN,
 TPNOBLOCK, and TPNOREPLY set.tpacall was called improperly.
 tpacall returned successfully.
 public CallDescriptor tpacall(String svc, TypedBuffer data, int flags, TpacallAsyncReply callBack) throws TPException
tpacall in interface ApplicationToMonitorInterfacesvc - same as ApplicationToMonitorInterface interfacedata - same as ApplicationToMonitorInterface interfaceflags - same as ApplicationToMonitorInterface interfacecallBack - The object to invoke when the service reply is ready. If the original request succeeded, 
 the TpacallAsynchReply.sucess method returns the reply from the service. If the original 
 request failed, the TpacallAsynchReply.failure method returns a failure code. If null,
 the request becomes a deferred asyncronous tpacall.same - as ApplicationToMonitorInterface interfaceTPException - Returns a TPException indicating the error condition.
 If an exception is thrown by this method the callBack will not
 be invoked.  
 tperrno is set to one of the following values:svc is null 
 or flags are invalid.
 svc does not exist or is a 
 conversational service.
 data does not match the 
 type and sub-type expected by svc.
 svc belongs to a server that does not support transactions
 and TPNOTRAN was not set.
 tpacall with TPNOTRAN,
 TPNOBLOCK, and TPNOREPLY set.tpacall was called improperly.
 tpacall returned successfully.public void tpcancel(CallDescriptor cd, int flags) throws TPException
tpcancel in interface ApplicationToMonitorInterfacecd - Call descriptor returned by a deferred or ansyncronous tpacall.flags - Must be zeroTPExceptionpublic Reply tpgetrply(CallDescriptor cd, int flags) throws TPException, TPReplyException
tpgetrply in interface ApplicationToMonitorInterfacecd - same as ApplicationToMonitorInterface interfaceflags - same as ApplicationToMonitorInterface interfacesame - as ApplicationToMonitorInterface interfaceTPException - Upon failure tpgetrply throws TPException to indicate the
 error condition. tperrno in TPException will be set to one of the following
 values:cd or 
 flags are invalid.
 cd points to an invalid descriptor.
 tpacall with TPNOTRAN,
 TPNOBLOCK and TPNOREPLY set.
 tpgetrply was called improperly.
 TPReplyException - If there is a service failure (TPESVCFAIL or
 TPSVCERROR) in which case the exception will also have reply
 data from the service.  However, unlike the tpcall case, this
 execption may also be thrown in any of the above TPException cases as well,
 so that specific TPException return codes can be matched with the
 request object returned from tpacall. If TPReplyException is thrown
 then it is on behalf of an outstanding request and that request is considered 
 to have completed with a failure.public byte[] tpenqueue(String qspace, String qname, EnqueueRequest ctl, TypedBuffer data, int flags) throws TPException
tpenqueue in interface ApplicationToMonitorInterfaceqspace - same as ApplicationToMonitorInterface interfaceqname - same as ApplicationToMonitorInterface interfacectl - same as ApplicationToMonitorInterface interfacedata - same as ApplicationToMonitorInterface interfaceflags - same as ApplicationToMonitorInterface interfacesame - as ApplicationToMonitorInterface interfaceTPException - Upon failure, tpenqueue() sets tperrno in TPException
 to one of the following values (unless otherwise noted, failure does not
 affect the callers transaction, if one exists)
 public DequeueReply tpdequeue(String qspace, String qname, byte[] msgid, byte[] corrid, boolean doWait, boolean doPeek, int flags) throws TPException
tpdequeue in interface ApplicationToMonitorInterfaceqspace - same as ApplicationToMonitorInterface interfaceqname - same as ApplicationToMonitorInterface interfacemsgid - same as ApplicationToMonitorInterface interfacecorrid - same as ApplicationToMonitorInterface interfacedoWait - same as ApplicationToMonitorInterface interfacedoPeek - same as ApplicationToMonitorInterface interfaceflags - same as ApplicationToMonitorInterface interfacesame - as ApplicationToMonitorInterface interfaceTPException - tperrno is set to
 one of the following values. (Unless otherwise noted, failure does not
 affect the caller's transaction, if one exists.)
 public DequeueReply tpdequeue(String qspace, String qname, int flags) throws TPException
tpdequeue in interface ApplicationToMonitorInterfaceqspace - same as ApplicationToMonitorInterface interfaceqname - same as ApplicationToMonitorInterface interfaceflags - same as ApplicationToMonitorInterface interfacesame - as ApplicationToMonitorInterface interfaceTPExceptionpublic Reply tpcall(String svc, TypedBuffer data, int flags) throws TPException, TPReplyException
tpcall in interface ApplicationToMonitorInterfacesvc - same as ApplicationToMonitorInterface interfacedata - same as ApplicationToMonitorInterface interfaceflags - same as ApplicationToMonitorInterface interfacesame - as ApplicationToMonitorInterface interfaceTPException - Upon failure tpcall sets tperrno in TPException to one of the
 following values. Unless otherwise noted, failure does not affect
 the caller's transaction, if one exists. svc is null or
 flags are invalid.
 svc because it does not exist, it is a
 conversational service, or the name provided begins with "." - a dot.
 svc accepts.
 svc belongs to a server that does not support transactions
 and TPNOTRAN was not set.
 tpacall with TPNOTRAN, TPNOBLOCK,
 and TPNOREPLY set.
 tpcall was called improperly.
 tpcall
 returned successfully.
 TPReplyException - If there was a service failure (TPESVCFAIL or
 TPSVCERROR), the exception will also have the reply data from the service.public void tpterm()
tpterm in interface ApplicationToMonitorInterfacepublic Conversation tpconnect(String svc, TypedBuffer data, int flags) throws TPException
tpconnect in interface ApplicationToMonitorInterfacesvc - same as ApplicationToMonitorInterface interfacedata - same as ApplicationToMonitorInterface interfaceflags - same as ApplicationToMonitorInterface interfacesame - as ApplicationToMonitorInterface interfaceTPException - Upon failure, ttpconnect returns a TPException exception
 to indicate the error condition.  tperrno in TPException will be set to one
 of the following values:svc is null
 or flags are invalid.
 tpacall with TPNOTRAN,
 TPNOBLOCK, and TPNOREPLY set.
 tpconnect was called improperly.
 public void tpsprio(int prio,
                    int flags)
             throws TPException
tpenqueue or tpdequeue.  By default,
 the setting of prio increments or decrements a service's
 default priority up to a maximum of 100 or down to a minimum of 1,
 depending on its sign, where 100 is the highest priority.  The default
 priority for a request is determined by the service to which the request
 is being sent.  This default may be specified administratively
 (see UBBCONFIG(5)), or take the system default of 50.  tpsprio() has no
 effect on messages sent via tpconnect or tpsend.
 A lower priority message does not remain enqueued forever because every
 tenth message is retrieved on a "first in, first out" (FIFO) basis.
 Response time should not be a concern of the lower priority interface or
 service.
 flags may be set to 0 or may be set to TPABSOLUTE.
 If TPABSOLUTE is set, then the priority of the next request should be
 sent out at the absolute value of prio. The absolute value of prio must
 be within the range 1 and 100, inclusive, with 100 being the highest
 priority. Any value outside of this range causes a default value to be
 used.tpsprio in interface ApplicationToMonitorInterfaceTPException