Class DiagStatusServiceImpl
- java.lang.Object
-
- org.opendaylight.infrautils.diagstatus.internal.DiagStatusServiceImpl
-
- All Implemented Interfaces:
DiagStatusService
@Singleton public class DiagStatusServiceImpl extends Object
DiagStatusServiceImpl is the core class having the functionality for tracking the registered services and aggregating the status of the same.- Author:
- Faseela K
-
-
Constructor Summary
Constructors Constructor Description DiagStatusServiceImpl(List<ServiceStatusProvider> serviceStatusProviders, SystemReadyMonitor systemReadyMonitor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.ImmutableList<ServiceDescriptor>
getAllServiceDescriptors()
Retrieve the status of all services registered so far.ServiceDescriptor
getServiceDescriptor(String serviceIdentifier)
Retrieve the status of a service specified by the identifier.ServiceStatusSummary
getServiceStatusSummary()
Retrieve the status of all services registered so far.ServiceRegistration
register(String serviceIdentifier)
Register a service for status monitoring.void
report(ServiceDescriptor serviceDescriptor)
Report the status of a service specified by the identifier.
-
-
-
Constructor Detail
-
DiagStatusServiceImpl
@Inject public DiagStatusServiceImpl(List<ServiceStatusProvider> serviceStatusProviders, SystemReadyMonitor systemReadyMonitor)
-
-
Method Detail
-
register
public final ServiceRegistration register(String serviceIdentifier)
Description copied from interface:DiagStatusService
Register a service for status monitoring.- Specified by:
register
in interfaceDiagStatusService
- Parameters:
serviceIdentifier
- unique identifier for the service being registered- Returns:
- Registration status
-
report
public final void report(ServiceDescriptor serviceDescriptor)
Description copied from interface:DiagStatusService
Report the status of a service specified by the identifier.- Specified by:
report
in interfaceDiagStatusService
- Parameters:
serviceDescriptor
- description of the service state
-
getServiceDescriptor
public final ServiceDescriptor getServiceDescriptor(String serviceIdentifier)
Description copied from interface:DiagStatusService
Retrieve the status of a service specified by the identifier.- Specified by:
getServiceDescriptor
in interfaceDiagStatusService
- Parameters:
serviceIdentifier
- unique identifier for a service
-
getAllServiceDescriptors
public final com.google.common.collect.ImmutableList<ServiceDescriptor> getAllServiceDescriptors()
Description copied from interface:DiagStatusService
Retrieve the status of all services registered so far.- Specified by:
getAllServiceDescriptors
in interfaceDiagStatusService
- Returns:
- status set for all registered services
-
getServiceStatusSummary
public final ServiceStatusSummary getServiceStatusSummary()
Description copied from interface:DiagStatusService
Retrieve the status of all services registered so far.- Specified by:
getServiceStatusSummary
in interfaceDiagStatusService
- Returns:
- status as a
ServiceStatusSummary
-
-