This chapter provides a detailed specification for the Service Monitor Service and describes each request, response, and event. It contains these sections:
Service Overview
The Service Monitor network service is built into the Network Core component and provides a real-time view of what network services are available. Clients using this service will first receive a comprehensive list of network services immediately after binding. After the initial list, the client will receive events each time a new service becomes available or an existing service is unregistered. This service always has the service id and name "ServiceMonitor" making it easy for clients to bind this service without having to locate it by its type or other information.
Service Specific Information
Each registered service has information specific to its service type, vendor, or instance. This information is available through the getServices Core Request or as part of this service's events. The following specific information is associated with the Service Monitor Service.
{
"vendor", "OpenMethods",
"version", "[current-core-version]"
}Service Requests and Responses
This service is informational in nature so does not accept direct requests from clients. All interaction with this service is through the events it generates.
Service Events
serviceList Event
This event is only generated when a new client is bound to the service and is delivered only to that new client. The event contains a complete list of all services available from this HIS instance and provides detailed information about each service in the list. This event will always occur immediately after binding is complete and will always be the first event received by the client. This event will not occur again during the lifecycle of the service binding.
{
"eventType": "serviceList",
"services":
[
{
"id": "[service-id]",
"name": "[service-name]",
"type": "[service-type]",
"serviceStatus":
{
"status": "OutOfService | Starting | InService | Stopping | Paused",
"acceptingClients": true | false,
"clientCount": [number-of-bound-clients]
},
"info":
{
[service-specific-info]
}
},
…
]
}serviceRegistered Event
This event is raised each time a new network service is registered with the host integration platform.
{
"eventType": "serviceRegistered",
"service":
{
"id": "[service-id]",
"name": "[service-name]",
"type": "[service-type]",
"serviceStatus":
{
"status": "OutOfService | Starting | InService | Stopping | Paused",
"acceptingClients": true | false,
"clientCount": [number-of-bound-clients]
},
"info":
{
[service-specific-info]
}
}
}serviceUnregistered Event
This event is raised each time a registered network service is removed from the host integration platform.
{
"eventType": "serviceUnregistered",
"service":
{
"id": "[service-id]",
"name": "[service-name]",
"type": "[service-type]",
"info":
{
[service-specific-info]
}
}
}