#include <Pt/Soap/Responder.h>
Dispatches requests to a service procedure.
Inherits Responder.
|
|
| Responder (const ServiceDeclaration &decl, Remoting::ServiceDefinition &def) |
| | Construct with Service declaration and definition.
|
|
virtual | ~Responder () |
| | Destructor.
|
|
bool | isFailed () const |
| | Indicates if the procedure has failed.
|
|
void | cancel () |
| | Resets to initial state.
|
|
const ServiceProcedure * | activeProcedure () const |
| | The currently executing procedure.
|
|
| virtual void | onReady () |
| | The service procedure has finished.
|
| virtual void | onCancel () |
| | Cancels all operations.
|
| virtual void | onFault (const Fault &fault)=0 |
| | The service procedure has failed.
|
| virtual void | onResult ()=0 |
| | The service procedure has finished.
|
| void | beginMessage (std::istream &is) |
| | Parses the XML-RPC message.
|
| bool | parseMessage () |
| | Parses the XML-RPC message.
|
| void | finishMessage (System::EventLoop &loop) |
| | Parses the XML-RPC message.
|
| void | beginResult (std::ostream &os) |
| | Formats the XML-RPC result.
|
| bool | advanceResult () |
| | Formats the XML-RPC message.
|
| void | finishResult () |
| | Formats the XML-RPC message.
|
| void | setFault (int rc, const char *msg) |
| | Fails the service procedure.
|
|
Pt::Composer ** | setProcedure (const std::string &name) |
| | Sets the service procedure.
|
|
void | beginCall (System::EventLoop &loop) |
| | Begins the service procedure call.
|
|
Pt::Decomposer * | endCall () |
| | Ends the service procedure call.
|
|
Pt::Decomposer * | call () |
| | Synchronous call without EventLoop.
|
◆ onReady()
◆ onCancel()
| virtual void onCancel |
( |
| ) |
|
|
protectedvirtual |
Derived responders implement this method to cancel all operations.
Implements Responder.
◆ onFault()
| virtual void onFault |
( |
const Fault & | fault | ) |
|
|
protectedpure virtual |
Derived responders implement this method to format and send the XML-RPC fault result. It is called when the service procedure has failed. Use beginResult(), advanceResult() and finishResult() to format the XML-RPC result.
◆ onResult()
| virtual void onResult |
( |
| ) |
|
|
protectedpure virtual |
Derived responders implement this method to format and send the XML-RPC result. It is called when the service procedure has finished. Use beginResult(), advanceResult() and finishResult() to format the XML-RPC result.
◆ beginMessage()
| void beginMessage |
( |
std::istream & | is | ) |
|
|
protected |
This method is used by derived responders to begin parsing a XML-RPC message from a std::istream.
◆ parseMessage()
This method is used by derived responders to parse a XML-RPC message. Each call consumes the available data from the std::istream set with beginMessage() and returns true if no more message data needs to be parsed, either because the message is complete or an error occured.
◆ finishMessage()
This method is used by derived responders after the XML-RPC message has been parsed by parseMessage(). This will execute the service procedure.
◆ beginResult()
| void beginResult |
( |
std::ostream & | os | ) |
|
|
protected |
This method is used by derived responders in onResult() and onError() to begin formatting a XML-RPC result to a std::ostream.
◆ advanceResult()
This method is used by derived responders in onResult() and onError() to format a XML-RPC result. Each call generates a chunk of the result and returns true if the message is complete.
◆ finishResult()
This method is used by derived responders in onResult() and onError() to format the end of a XML-RPC result. It is called after advanceResult() returns true.
◆ setFault()
| void setFault |
( |
int | rc, |
|
|
const char * | msg ) |
|
protected |
This method is used by derived responders to indicate that the service procedure should not be executed, but a fault result be generated instead.