Copyright © TIBCO Software Inc. All Rights Reserved


Appendix D Adapter Agent API References : TIBCO Rendezvous Adapter Agent Methods

TIBCO Rendezvous Adapter Agent Methods
The following adapter agent methods use TIBCO Rendezvous. The header file relating to them is adapteragent.h and the link library relating to them is agent.lib for Microsoft Windows or libagent.so/libagent.sl for Unix.
With regard to publication services, there are two methods for Asynchronous Rendezvous Adapter Agent, callPub() and callCArrayPub(). There are two methods for Synchronous Rendezvous Adapter Agent, callSyncPub() and callSyncCArrayPub().
The callPub Method
int callPub(char * serviceName, char * sendbuf, char * service, char * network, char * daemon, char * subject);
This method is for publication services based on Asynchronous Rendezvous Adapter Agent. The user's Tuxedo service invokes the method to send the request which uses FML32/STRING buffers to TIBCO Rendezvous.
char * serviceName The name of the adapter service to be used
char * sendbuf The request buffer of type FML32/STRING
char * service The service parameter of the TIBCO Rendezvous transport which is used internally
char * network The network parameter of the TIBCO Rendezvous transport which is used internally
char * daemon The daemon parameter of the TIBCO Rendezvous transport which is used internally
char * subject The message subject on which the message is to be sent from the Adapter Agent to the adapter
The method returns 1 on success, and 0 on failure. Error messages are written into the Tuxedo ULOG file.
The callCArrayPub Method
int callCArrayPub(char * serviceName, char * sendbuf, char * service, char * network, char * daemon, char * subject, long sendlen)
This method is for publication services Asynchronous Rendezvous Adapter Agent. The user's Tuxedo service invokes the method to send the request which uses CArray buffers to TIBCO Rendezvous.
char * serviceName The name of the adapter service to be used
char * sendbuf The request buffer of type CArray
char * service The service parameter of the TIBCO Rendezvous transport that is used internally
char * network The network parameter of the TIBCO Rendezvous transport that is used internally
char * daemon The daemon parameter of the TIBCO Rendezvous transport that is used internally
char * subject The message subject on which the message is to be sent
long sendlen The length of the CArray buffer to be sent
The method returns 1 on success, and 0 on failure. Error messages are written into the Tuxedo ULOG file.
The callSyncPub Method
int callSyncPub(char * serviceName, char * sendbuf, char * service, char * network, char * daemon, char * subject, unsigned long agentTimeout);
This method is for publication services based on Synchronous Rendezvous Adapter Agent. The user's Tuxedo service invokes the method to send the request which uses FML32/STRING buffers to TIBCO Rendezvous, and then the agent waits for the feedback from the adapter.
char * serviceName The name of the adapter service to be used
char * sendbuf The request buffer of type FML32/STRING
char * service The service parameter of the TIBCO Rendezvous transport which is used internally
char * network The network parameter of the TIBCO Rendezvous transport which is used internally
char * daemon The daemon parameter of the TIBCO Rendezvous transport which is used internally
char * subject The message subject on which the message is to be sent from the agent to the adapter
unsigned long agentTimeout The timeout of the agent in seconds.
The method returns 1 on success, and 0 on failure. Error messages are written into the Tuxedo ULOG file.
The callSyncCArrayPub Method
int callSyncCArrayPub(char * serviceName, char * sendbuf, char * service, char * network, char * daemon, char * subject, long sendlen, unsigned long agentTimeout)
This method is for publication services based on Synchronous Rendezvous Adapter Agent. The user's Tuxedo service invokes the method to send the request which uses CArray buffers to TIBCO Rendezvous, and then the agent waits for the feedback from the adapter.
char * serviceName The name of the adapter service to be used
char * sendbuf The request buffer of type CArray
char * service The service parameter of the TIBCO Rendezvous transport that is used internally
char * network The network parameter of the TIBCO Rendezvous transport that is used internally
char * daemon The daemon parameter of the TIBCO Rendezvous transport that is used internally
char * subject— The message subject on which the message is to be sent
long sendlen The length of the CArray buffer to be sent
unsigned long agentTimeout The timeout of the agent in seconds.
The method returns 1 on success, and 0 on failure. Error messages are written into the Tuxedo ULOG file.
When some abnormal situations occur, callPub or callCArrayPub will still return a success message, but callSyncPub or callSyncCArrayPub will report the errors by returning a failure message, which is received from the adapter. Those situations are as follows:
The serviceName (the first parameter of each method) is different from the Name in the Configuration tab of Publication Service configured in TIBCO Designer.
The subject (the six parameter of each method) is different from the Subject in the Configuration tab of PubAgentSubscriber (TuxedoAdapterConfiguration>Advanced>Sessions>DefaultRVSession>PubAgentSubscriber) configured in TIBCO Designer.
The callClient Method
int callClient (char * serviceName, char * sendbuf, unsigned long adapterTimeout, char * service, char * network, char * daemon, unsigned long agentTimeout, char * subject, void** replyBuf)
This method is for Resquest-Response invocation services. The user's Tuxedo service invokes the method to send the request which uses FML32/STRING buffers to TIBCO Rendezvous.
char * serviceNameThe name of the adapter service to be used
char * sendbufThe request buffer of type FML32/STRING
unsigned long adapterTimeout The timeout of the adapter in seconds
char * serviceThe service parameter of the TIBCO Rendezvous transport that is used internally
char * network The network parameter of the TIBCO Rendezvous transport that is used internally
char * daemon The daemon parameter of the TIBCO Rendezvous transport that is used internally
unsigned long agentTimeout The timeout of the agent in seconds
char * subject The message subject on which the message is to be sent from the Adapter Agent to the adapter
void ** replyBuf The address of the reply buffer of type FML32/STRING. The replyBuf must be allocated by tpalloc.
The method returns 1 on success, and 0 on failure. Error messages are written into the Tuxedo ULOG file.
The callCArrayClient Method
int callCArrayClient(char * serviceName, char * sendbuf, unsigned long adapterTimeout, char * service, char * network, char * daemon, unsigned long agentTimeout, char* subject, void** replyBuf, long sendlen, unsigned int* rcvlen)
This method is for Request-Response invocation services. The user's Tuxedo service invokes the method to send the request which uses CArray buffers to TIBCO Rendezvous.
char * serviceNameThe name of the adapter service to be used
char * sendbufThe request buffer of type CArray
unsigned long adapterTimeout The timeout of the adapter in seconds
char * serviceThe service parameter of the TIBCO Rendezvous transport that is used internally
char * network The network parameter of the TIBCO Rendezvous transport that is used internally
char * daemon The daemon parameter of the TIBCO Rendezvous transport that is used internally
unsigned long agentTimeout The timeout of the agent in seconds
char * subject The message subject on which the message is to be sent from the Adapter Agent to the adapter
void ** replyBuf The address of the reply CArray buffer. The replyBuf must be allocated by tpalloc
long sendlenThe length of the CArray buffer to be sent
unsigned int* rcvlenThe address of a integer to return the length of replyBuf
The method returns 1 if successful, and 0 if it failed. Error messages are written into the Tuxedo ULOG file.

Copyright © TIBCO Software Inc. All Rights Reserved