| Iris Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
#define IRIS_SERVICE_CONST (obj) IrisServicePrivate; IrisService; void iris_service_start (IrisService *service); void iris_service_stop (IrisService *service); void iris_service_send_exclusive (IrisService *service, IrisMessage *message); void iris_service_send_concurrent (IrisService *service, IrisMessage *message); gboolean iris_service_is_started (IrisService *service);
IrisService is a class to help design concurrent services. Most services tend to be in one of a couple of states. Either it can work on requests concurrently, or a state change meaning no concurrency, or the service is no-longer valid. Because of this, IrisService reflects this concept and provides a starting point for writing a new service.
By creating a new class with the proper overrides for handling messages, you can let IrisService handle the scaling up and down of message handling.
#define IRIS_SERVICE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IRIS_TYPE_SERVICE, IrisService const))
|
void iris_service_start (IrisService *service);
Starts the IrisService.
|
An IrisService |
void iris_service_stop (IrisService *service);
Stops a running IrisService
|
An IrisService |
void iris_service_send_exclusive (IrisService *service, IrisMessage *message);
Sends an exclusive message to the service. The message is guaranteed to be handled while no other handlers are executing.
|
An IrisService |
|
An IrisMessage |
void iris_service_send_concurrent (IrisService *service, IrisMessage *message);
Sends a concurrent message to the service. The message can be handled concurrently with other concurrent messages to the service.
|
An IrisService |
|
An IrisMessage |
gboolean iris_service_is_started (IrisService *service);
See iris_service_start().
|
An IrisService |
Returns : |
TRUE if the service has been started
|