Made to Order Software Corporation Logo

LLChatLib: LLSDRPCClient Class Reference

LLSDRPCClient Class Reference

Client class for a structured data remote procedure call. More...

#include <llsdrpcclient.h>

Inheritance diagram for LLSDRPCClient:
Collaboration diagram for LLSDRPCClient:

List of all members.

Public Types

enum  EPassBackQueue
 

Enumeration for tracking which queue to process the response.



Public Member Functions

bool call (const std::string &uri, const std::string &method, const std::string &parameter, LLSDRPCResponse *response, EPassBackQueue queue)
 Call a method on a remote LLSDRPCServer.

bool call (const std::string &uri, const std::string &method, const LLSD &parameter, LLSDRPCResponse *response, EPassBackQueue queue)
 Call a method on a remote LLSDRPCServer.

 LLSDRPCClient ()

Protected Types

enum  EState
 

Enumeration for tracking client state.



Protected Member Functions

virtual EStatus process_impl (const LLChannelDescriptors &channels, buffer_ptr_t &buffer, bool &eos, LLSD &context, LLPumpIO *pump)
 Process the data in buffer.


Detailed Description

Client class for a structured data remote procedure call.

This class helps deal with making structured data calls to a remote server. You can visualize the calls as: response = uri.method(parameter) where you pass in everything to call and this class takes care of the rest of the details. In typical usage, you will derive a class from this class and provide an API more useful for the specific application at hand. For example, if you were writing a service to send an instant message, you could create an API for it to send the messsage, and that class would do the work of translating it into the method and parameter, find the destination, and invoke call</call> with a useful implementation of LLSDRPCResponse passed in to handle the response from the network.


Constructor & Destructor Documentation

LLSDRPCClient::LLSDRPCClient (  ) 

Member Function Documentation

bool LLSDRPCClient::call ( const std::string &  uri,
const std::string &  method,
const std::string &  parameter,
LLSDRPCResponse *  response,
EPassBackQueue  queue 
)

Call a method on a remote LLSDRPCServer.

Parameters:
uri The remote object to call, eg, http://localhost/usher. If you are using a factory with a fixed url, the uri passed in will probably be ignored.
method The method to call on the remote object
parameter The seriailized parameter to pass into the remote object.
response The object which gets the response.
queue Specifies to call the response on the process or callback queue.
Returns:
Returns true if this object will be able to make the RPC call.
bool LLSDRPCClient::call ( const std::string &  uri,
const std::string &  method,
const LLSD parameter,
LLSDRPCResponse *  response,
EPassBackQueue  queue 
)

Call a method on a remote LLSDRPCServer.

Parameters:
uri The remote object to call, eg, http://localhost/usher. If you are using a factory with a fixed url, the uri passed in will probably be ignored.
method The method to call on the remote object
parameter The parameter to pass into the remote object. It is up to the caller to delete the value passed in.
response The object which gets the response.
queue Specifies to call the response on the process or callback queue.
Returns:
Returns true if this object will be able to make the RPC call.

The documentation for this class was generated from the following files:
Generated on Thu Sep 23 17:18:45 2010 for LLChatLib by  doxygen 1.6.3