#include <server.h>
Inheritance diagram for MPS::InterfaceServer:
Public Types | |
typedef void (* | request_handler_t )(ref< Interface > const &__impl, InputStream &__input, OutputStream &__output) |
Public Methods | |
InterfaceServer (string const &objectName, ref< Interface > const &impl) | |
virtual void | dispatch (InputStream &request, OutputStream &reply) |
Protected Methods | |
void | registerMethod (int methodIndex, string const &methodName, request_handler_t handler) |
Private Types | |
typedef vector<request_handler_t> | requesthandlervec_t |
Private Attributes | |
ref<Interface> | __impl |
requesthandlervec_t | methods |
Friends | |
class | Transport |
The dispatcher here reads a message, takes the first int from it, and uses it to index into a list of request-handler function pointers, which then further deconstruct the incoming message, call their implementation object, and fill in a reply message, which is sent along the Connection by the InterfaceServer::dispatch() method.
Definition at line 106 of file server.h.
|
This is the type that each method in the MPS automatically-generated server-glue should have. The __impl parameter is used to pass down a handle on the implementation object; the __input and __output parameters are used for communication with the client. Request handlers that do not wish to send a reply message containing any data (ie. void-typed methods) should not fill in any bytes in __output. The dispatch() method below takes this as an indication of a void response.
|
|
A list of method-handlers.
|
|
Create an MPS object server called objectName, implemented by impl.
|
|
Dispatches an method request coming in over a connection.
Reimplemented from MPS::Server. |
|
Called by (automatically-generated) subclasses to register method-handlers.
|
|
Allows access to bindName() and unbindName().
Reimplemented from MPS::Server. |
|
Our implementation object.
|
|
All the methods we implement.
|