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.

1{ 2 "vendor", "OpenMethods", 3 "version", "[current-core-version]" 4}

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.

1{ 2 "eventType": "serviceList", 3 "services": 4 [ 5 { 6 "id": "[service-id]", 7 "name": "[service-name]", 8 "type": "[service-type]", 9 "serviceStatus": 10 { 11 "status": "OutOfService | Starting | InService | Stopping | Paused", 12 "acceptingClients": true | false, 13 "clientCount": [number-of-bound-clients] 14 }, 15 "info": 16 { 17 [service-specific-info] 18 } 19 }, 2021 ] 22}

serviceRegistered Event

This event is raised each time a new network service is registered with the host integration platform.

1{ 2 "eventType": "serviceRegistered", 3 "service": 4 { 5 "id": "[service-id]", 6 "name": "[service-name]", 7 "type": "[service-type]", 8 "serviceStatus": 9 { 10 "status": "OutOfService | Starting | InService | Stopping | Paused", 11 "acceptingClients": true | false, 12 "clientCount": [number-of-bound-clients] 13 }, 14 "info": 15 { 16 [service-specific-info] 17 } 18 } 19}

serviceUnregistered Event

This event is raised each time a registered network service is removed from the host integration platform.

1{ 2 "eventType": "serviceUnregistered", 3 "service": 4 { 5 "id": "[service-id]", 6 "name": "[service-name]", 7 "type": "[service-type]", 8 "info": 9 { 10 [service-specific-info] 11 } 12 } 13}