Operation1
Reply
provides data members and member functions specific to each service in a server application. These member functions can be used to retrieve the results of a service request to a server application.
BEATuxBldr · ServiceReply · Operation1
Reply (Generated Service Reply)
For operations in the Rose Model with out
and/or inout
parameters, the Rose Expert generates a class whose data members are the operation parameters of the out
and/or inout
kind. The name of the each parameter is used in the name of the corresponding generated data member and accessor member function.
For operations with an output parameter of a simple type, the generated data member and member function will be declared with that type. In the Get
Getparameter2
example below, the parameter2
data member is an integer, which the Get
Getparameter2
member function returns. The other simple types supported by the Rose Expert are listed in the Programming Model and Data Type Mapping section.
For operations with an output parameter of an aggregate type (for example, a structure type), the generated data member and member function will be declared as a structure. In the parameter3
example below, the parameter3
data member is a structure, and the Get
parameter3
member function returns a pointer to that structure.
Warning: It is the responsibility of the client application to delete the reply object obtained from a service invocation. Deleting a reply object with a pending reply results in that outstanding reply being canceled.
Only the specific outstanding reply can be obtained. There is no support for retrieving "any" outstanding reply. The Rose Expert does not have any notion of a session associated with a service request, nor does it generate any code for maintaining the context in which a service request was made.
Rather than generating a get and set member function for each of the data members in the TPQCTL
structure, GetTpqctl
can be used to get a reference to the structure and SetTpqctl
can be used to save any changes you make to that structure. The TPQCTL
structure give you control of queueing operations when you wish to override the default operation of the queue. For more information about queueing, refer to tpenqueue
in the BEA TUXEDO Reference Manual (see Where to Find Related Information).
This section lists the member functions of Generated Service Reply.
Generated member function that returns a simple type.
The name of a generated member function is the same as the name of the parameter in the Rose Model, with the Generated data member that contains an aggregate type.
The name of a generated member function is the same as the name of the parameter in the Rose Model, with the
Getparameter2
Synopsis
int Get
parameter2
()
Returns
parameter2
Description
Get
prepended. Calls to this member function returns the value of the parameter of the same name. For example, the Operation1
Reply::Get
parameter2
()
member function would return the value of the Operation1
Reply::
parameter2
data member.
parameter3
Synopsis
struct
Struct1
* Getparameter3
()
Returns
parameter3
*
Description
Get
prepended. Calls to this member function returns a pointer to a structure of the same name. or example, the Operation1
Reply::
Getparameter3
()
member function would return a pointer to the Operation1
Reply::
parameter3
data member.
ReplyCompleted
ReplyCompleted
is used to determine when data has been returned by the service request.
Synopsis
Boolean ReplyCompleted() throw (TuxException*,
Operation1
Exception*)
Returns
Operation1
Reply
.
Operation1
Reply
.
TuxException*
TuxException
for more information.
Operation1
Exception*
(Generated Exception)
Operation1
.
ReplyCompleted determines if a reply to the service request is available. For synchronous service requests, the reply is available on return from the service call. For asynchronous requests, the client must collect the outstanding reply, if it is available. Your application can determine when a reply is available by polling.
Once a call to ReplyCompleted
returns TRUE, any further invocation on the same reply object raises an AtmiException
.