#include <shibsp/remoting/ListenerService.h>
Public Member Functions | |
virtual DDF | send (const DDF &in)=0 |
Send a remoted message and return the response. | |
void | receive (DDF &in, std::ostream &out) |
Remoted classes implement this method to process incoming messages. | |
virtual Remoted * | regListener (const char *address, Remoted *svc) |
Register for a message. | |
virtual bool | unregListener (const char *address, Remoted *current, Remoted *restore=NULL) |
Unregisters service from an address, possibly restoring an original. | |
virtual Remoted * | lookup (const char *address) const |
Returns current service registered at an address, if any. | |
virtual bool | run (bool *shutdown)=0 |
OutOfProcess servers can implement server-side transport handling by calling the run method and supplying a flag to monitor for shutdown. |
A ListenerService supports the remoting of DDF objects, which are dynamic data trees that other class implementations can use to remote themselves by calling an out-of-process peer implementation with arbitrary data to carry out tasks on the implementation's behalf that require isolation from the dynamic process fluctuations that web servers are prone to. The ability to pass arbitrary data trees across the boundary allows arbitrary separation of duty between the in-process and out-of-process "halves". The ListenerService is responsible for marshalling and transmitting messages, as well as managing connections and communication errors.
virtual Remoted* shibsp::ListenerService::lookup | ( | const char * | address | ) | const [virtual] |
Returns current service registered at an address, if any.
address | message address to access |
void shibsp::ListenerService::receive | ( | DDF & | in, | |
std::ostream & | out | |||
) | [virtual] |
virtual Remoted* shibsp::ListenerService::regListener | ( | const char * | address, | |
Remoted * | svc | |||
) | [virtual] |
Register for a message.
Returns existing remote service, allowing message hooking.
address | message address to register | |
svc | pointer to remote service |
virtual bool shibsp::ListenerService::run | ( | bool * | shutdown | ) | [pure virtual] |
OutOfProcess servers can implement server-side transport handling by calling the run method and supplying a flag to monitor for shutdown.
shutdown | pointer to flag that caller will set when shutdown is required |
Send a remoted message and return the response.
in | input message to send |
virtual bool shibsp::ListenerService::unregListener | ( | const char * | address, | |
Remoted * | current, | |||
Remoted * | restore = NULL | |||
) | [virtual] |
Unregisters service from an address, possibly restoring an original.
address | message address to modify | |
current | pointer to unregistering service | |
restore | service to "restore" registration for |