|
BOSS 8.0.0
BESIII Offline Software System
|
A class to handle XML RPC requests. More...
#include <XmlRpcServer.h>
Public Member Functions | |
| XmlRpcServer () | |
| Create a server object. | |
| virtual | ~XmlRpcServer () |
| Destructor. | |
| void | enableIntrospection (bool enabled=true) |
| Specify whether introspection is enabled or not. Default is not enabled. | |
| void | addMethod (XmlRpcServerMethod *method) |
| Add a command to the RPC server. | |
| void | removeMethod (XmlRpcServerMethod *method) |
| Remove a command from the RPC server. | |
| void | removeMethod (const std::string &methodName) |
| Remove a command from the RPC server by name. | |
| XmlRpcServerMethod * | findMethod (const std::string &name) const |
| Look up a method by name. | |
| bool | bindAndListen (int port, int backlog=5) |
| void | work (double msTime) |
| Process client requests for the specified time. | |
| void | exit () |
| Temporarily stop processing client requests and exit the work() method. | |
| void | shutdown () |
| Close all connections with clients and the socket file descriptor. | |
| void | listMethods (XmlRpcValue &result) |
| Introspection support. | |
| virtual unsigned | handleEvent (unsigned eventType) |
| Handle client connection requests. | |
| virtual void | removeConnection (XmlRpcServerConnection *) |
| Remove a connection from the dispatcher. | |
| 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 () |
Protected Types | |
| typedef std::map< std::string, XmlRpcServerMethod * > | MethodMap |
Protected Member Functions | |
| virtual void | acceptConnection () |
| Accept a client connection request. | |
| virtual XmlRpcServerConnection * | createConnection (int socket) |
| Create a new connection object for processing requests from a specific client. | |
Protected Attributes | |
| bool | _introspectionEnabled |
| XmlRpcDispatch | _disp |
| MethodMap | _methods |
| XmlRpcServerMethod * | _listMethods |
| XmlRpcServerMethod * | _methodHelp |
A class to handle XML RPC requests.
Definition at line 31 of file XmlRpcServer.h.
|
protected |
Definition at line 91 of file XmlRpcServer.h.
| XmlRpcServer::XmlRpcServer | ( | ) |
Create a server object.
Definition at line 11 of file XmlRpcServer.cpp.
|
virtual |
Destructor.
Definition at line 17 of file XmlRpcServer.cpp.
|
protectedvirtual |
Accept a client connection request.
Definition at line 124 of file XmlRpcServer.cpp.
Referenced by handleEvent().
| void XmlRpcServer::addMethod | ( | XmlRpcServerMethod * | method | ) |
Add a command to the RPC server.
Definition at line 25 of file XmlRpcServer.cpp.
Referenced by enableIntrospection().
| bool XmlRpcServer::bindAndListen | ( | int | port, |
| int | backlog = 5 ) |
Create a socket, bind to the specified port, and set it in listen mode to make it available for clients.
Definition at line 50 of file XmlRpcServer.cpp.
|
protectedvirtual |
Create a new connection object for processing requests from a specific client.
Definition at line 148 of file XmlRpcServer.cpp.
Referenced by acceptConnection().
| void XmlRpcServer::enableIntrospection | ( | bool | enabled = true | ) |
Specify whether introspection is enabled or not. Default is not enabled.
Definition at line 200 of file XmlRpcServer.cpp.
| void XmlRpcServer::exit | ( | ) |
Temporarily stop processing client requests and exit the work() method.
Definition at line 156 of file XmlRpcServer.cpp.
| XmlRpcServerMethod * XmlRpcServer::findMethod | ( | const std::string & | name | ) | const |
Look up a method by name.
Definition at line 42 of file XmlRpcServer.cpp.
|
virtual |
Handle client connection requests.
Implements XmlRpc::XmlRpcSource.
Definition at line 117 of file XmlRpcServer.cpp.
| void XmlRpcServer::listMethods | ( | XmlRpcValue & | result | ) |
Introspection support.
Definition at line 225 of file XmlRpcServer.cpp.
|
virtual |
Remove a connection from the dispatcher.
Definition at line 153 of file XmlRpcServer.cpp.
| void XmlRpcServer::removeMethod | ( | const std::string & | methodName | ) |
Remove a command from the RPC server by name.
Definition at line 36 of file XmlRpcServer.cpp.
| void XmlRpcServer::removeMethod | ( | XmlRpcServerMethod * | method | ) |
Remove a command from the RPC server.
Definition at line 30 of file XmlRpcServer.cpp.
Referenced by enableIntrospection().
| void XmlRpcServer::shutdown | ( | ) |
Close all connections with clients and the socket file descriptor.
Definition at line 159 of file XmlRpcServer.cpp.
Referenced by ~XmlRpcServer().
| void XmlRpcServer::work | ( | double | msTime | ) |
Process client requests for the specified time.
Definition at line 110 of file XmlRpcServer.cpp.
|
protected |
Definition at line 88 of file XmlRpcServer.h.
Referenced by acceptConnection(), bindAndListen(), exit(), removeConnection(), shutdown(), and work().
|
protected |
Definition at line 85 of file XmlRpcServer.h.
Referenced by enableIntrospection(), and XmlRpcServer().
|
protected |
Definition at line 95 of file XmlRpcServer.h.
Referenced by enableIntrospection(), XmlRpcServer(), and ~XmlRpcServer().
|
protected |
Definition at line 96 of file XmlRpcServer.h.
Referenced by enableIntrospection(), XmlRpcServer(), and ~XmlRpcServer().
|
protected |
Definition at line 92 of file XmlRpcServer.h.
Referenced by addMethod(), findMethod(), listMethods(), removeMethod(), removeMethod(), and ~XmlRpcServer().