|
BOSS 8.0.0
BESIII Offline Software System
|
A class to handle XML RPC requests from a particular client. More...
#include <XmlRpcServerConnection.h>
Public Member Functions | |
| XmlRpcServerConnection (int fd, XmlRpcServer *server, bool deleteOnClose=false) | |
| Constructor. | |
| virtual | ~XmlRpcServerConnection () |
| Destructor. | |
| virtual unsigned | handleEvent (unsigned eventType) |
| Public Member Functions inherited from XmlRpc::XmlRpcSource | |
| XmlRpcSource (int fd=-1, bool deleteOnClose=false) | |
| virtual | ~XmlRpcSource () |
| Destructor. | |
| int | getfd () const |
| Return the file descriptor being monitored. | |
| void | setfd (int fd) |
| Specify the file descriptor to monitor. | |
| bool | getKeepOpen () const |
| Return whether the file descriptor should be kept open if it is no longer monitored. | |
| void | setKeepOpen (bool b=true) |
| Specify whether the file descriptor should be kept open if it is no longer monitored. | |
| virtual void | close () |
Static Public Attributes | |
| static const char | METHODNAME_TAG [] = "<methodName>" |
| static const char | PARAMS_TAG [] = "<params>" |
| static const char | PARAMS_ETAG [] = "</params>" |
| static const char | PARAM_TAG [] = "<param>" |
| static const char | PARAM_ETAG [] = "</param>" |
| static const std::string | SYSTEM_MULTICALL = "system.multicall" |
| static const std::string | METHODNAME = "methodName" |
| static const std::string | PARAMS = "params" |
| static const std::string | FAULTCODE = "faultCode" |
| static const std::string | FAULTSTRING = "faultString" |
Protected Types | |
| enum | ServerConnectionState { READ_HEADER , READ_REQUEST , WRITE_RESPONSE } |
Protected Member Functions | |
| bool | readHeader () |
| bool | readRequest () |
| bool | writeResponse () |
| virtual void | executeRequest () |
| std::string | parseRequest (XmlRpcValue ¶ms) |
| bool | executeMethod (const std::string &methodName, XmlRpcValue ¶ms, XmlRpcValue &result) |
| bool | executeMulticall (const std::string &methodName, XmlRpcValue ¶ms, XmlRpcValue &result) |
| void | generateResponse (std::string const &resultXml) |
| void | generateFaultResponse (std::string const &msg, int errorCode=-1) |
| std::string | generateHeader (std::string const &body) |
Protected Attributes | |
| XmlRpcServer * | _server |
| ServerConnectionState | _connectionState |
| std::string | _header |
| int | _contentLength |
| std::string | _request |
| std::string | _response |
| int | _bytesWritten |
| bool | _keepAlive |
A class to handle XML RPC requests from a particular client.
Definition at line 24 of file XmlRpcServerConnection.h.
|
protected |
| Enumerator | |
|---|---|
| READ_HEADER | |
| READ_REQUEST | |
| WRITE_RESPONSE | |
Definition at line 78 of file XmlRpcServerConnection.h.
| XmlRpcServerConnection::XmlRpcServerConnection | ( | int | fd, |
| XmlRpcServer * | server, | ||
| bool | deleteOnClose = false ) |
Constructor.
Definition at line 29 of file XmlRpcServerConnection.cpp.
|
virtual |
|
protected |
Definition at line 257 of file XmlRpcServerConnection.cpp.
Referenced by executeMulticall(), and executeRequest().
|
protected |
Definition at line 272 of file XmlRpcServerConnection.cpp.
Referenced by executeMulticall(), and executeRequest().
|
protectedvirtual |
Definition at line 213 of file XmlRpcServerConnection.cpp.
Referenced by writeResponse().
|
protected |
Definition at line 348 of file XmlRpcServerConnection.cpp.
Referenced by executeRequest().
|
protected |
Definition at line 334 of file XmlRpcServerConnection.cpp.
Referenced by generateFaultResponse(), and generateResponse().
|
protected |
Definition at line 321 of file XmlRpcServerConnection.cpp.
Referenced by executeRequest().
|
virtual |
Handle IO on the client connection socket.
| eventType | Type of IO event that occurred. |
Implements XmlRpc::XmlRpcSource.
Definition at line 46 of file XmlRpcServerConnection.cpp.
|
protected |
Definition at line 236 of file XmlRpcServerConnection.cpp.
Referenced by executeRequest().
|
protected |
Definition at line 60 of file XmlRpcServerConnection.cpp.
Referenced by handleEvent().
|
protected |
Definition at line 144 of file XmlRpcServerConnection.cpp.
Referenced by handleEvent().
|
protected |
Definition at line 178 of file XmlRpcServerConnection.cpp.
Referenced by handleEvent().
|
protected |
Definition at line 94 of file XmlRpcServerConnection.h.
Referenced by writeResponse().
|
protected |
Definition at line 79 of file XmlRpcServerConnection.h.
Referenced by handleEvent(), readHeader(), readRequest(), writeResponse(), and XmlRpcServerConnection().
|
protected |
Definition at line 85 of file XmlRpcServerConnection.h.
Referenced by readHeader(), and readRequest().
|
protected |
Definition at line 82 of file XmlRpcServerConnection.h.
Referenced by readHeader(), and writeResponse().
|
protected |
Definition at line 97 of file XmlRpcServerConnection.h.
Referenced by readHeader(), writeResponse(), and XmlRpcServerConnection().
|
protected |
Definition at line 88 of file XmlRpcServerConnection.h.
Referenced by parseRequest(), readHeader(), readRequest(), and writeResponse().
|
protected |
Definition at line 91 of file XmlRpcServerConnection.h.
Referenced by generateFaultResponse(), generateResponse(), and writeResponse().
|
protected |
Definition at line 75 of file XmlRpcServerConnection.h.
Referenced by executeMethod(), XmlRpcServerConnection(), and ~XmlRpcServerConnection().
|
static |
Definition at line 37 of file XmlRpcServerConnection.h.
Referenced by executeMulticall(), and generateFaultResponse().
|
static |
Definition at line 38 of file XmlRpcServerConnection.h.
Referenced by executeMulticall(), and generateFaultResponse().
|
static |
Definition at line 34 of file XmlRpcServerConnection.h.
Referenced by executeMulticall().
|
static |
Definition at line 27 of file XmlRpcServerConnection.h.
Referenced by parseRequest().
|
static |
Definition at line 31 of file XmlRpcServerConnection.h.
Referenced by parseRequest().
|
static |
Definition at line 30 of file XmlRpcServerConnection.h.
Referenced by parseRequest().
|
static |
Definition at line 35 of file XmlRpcServerConnection.h.
Referenced by executeMulticall().
|
static |
Definition at line 29 of file XmlRpcServerConnection.h.
Referenced by parseRequest().
|
static |
Definition at line 28 of file XmlRpcServerConnection.h.
Referenced by parseRequest().
|
static |
Definition at line 33 of file XmlRpcServerConnection.h.
Referenced by executeMulticall().