@Singleton @OsgiServiceProvider(classes=DiagStatusService.class) public class DiagStatusServiceImpl extends Object implements DiagStatusService
| Constructor and Description |
|---|
DiagStatusServiceImpl(List<ServiceStatusProvider> serviceStatusProviders,
SystemReadyMonitor systemReadyMonitor) |
| Modifier and Type | Method and Description |
|---|---|
Collection<ServiceDescriptor> |
getAllServiceDescriptors()
Retrieve the status of all services registered so far.
|
String |
getAllServiceDescriptorsAsJSON()
Retrieve the status of all services registered so far as a JSON String with a
fixed format which external systems can rely on.
|
ServiceDescriptor |
getServiceDescriptor(String serviceIdentifier)
Retrieve the status of a service specified by the identifier.
|
boolean |
isOperational()
Retrieve single true/false boolean indicating if the system is operational to
the best of diagstatus' knowledge.
|
ServiceRegistration |
register(String serviceIdentifier)
Register a service for status monitoring.
|
void |
report(ServiceDescriptor serviceDescriptor)
Report the status of a service specified by the identifier.
|
@Inject public DiagStatusServiceImpl(List<ServiceStatusProvider> serviceStatusProviders, SystemReadyMonitor systemReadyMonitor)
public ServiceRegistration register(String serviceIdentifier)
DiagStatusServiceregister in interface DiagStatusServiceserviceIdentifier - unique identifier for the service being registeredpublic void report(ServiceDescriptor serviceDescriptor)
DiagStatusServicereport in interface DiagStatusServiceserviceDescriptor - description of the service statepublic ServiceDescriptor getServiceDescriptor(String serviceIdentifier)
DiagStatusServicegetServiceDescriptor in interface DiagStatusServiceserviceIdentifier - unique identifier for a servicepublic Collection<ServiceDescriptor> getAllServiceDescriptors()
DiagStatusServicegetAllServiceDescriptors in interface DiagStatusServicepublic boolean isOperational()
DiagStatusServiceSystemReadyMonitorMXBean's SystemState
being ACTIVE, and all of the currently reported ServiceDescriptor's
ServiceState being OPERATIONAL.isOperational in interface DiagStatusServicepublic String getAllServiceDescriptorsAsJSON()
DiagStatusServicegetAllServiceDescriptorsAsJSON in interface DiagStatusServiceCopyright © 2019 OpenDaylight. All rights reserved.