Search in sources :

Example 1 with SystemState

use of org.opendaylight.infrautils.ready.SystemState in project infrautils by opendaylight.

the class DiagStatusTestModule method configureBindings.

@Override
protected void configureBindings() throws UnknownHostException {
    bind(DiagStatusService.class).to(DiagStatusServiceImpl.class);
    bind(new TypeLiteral<List<ServiceStatusProvider>>() {
    }).toInstance(Collections.emptyList());
    bind(SystemReadyMonitor.class).annotatedWith(OsgiService.class).toInstance(new SystemReadyMonitor() {

        @Override
        public void registerListener(SystemReadyListener listener) {
        // NOOP
        }

        @Override
        public SystemState getSystemState() {
            return SystemState.ACTIVE;
        }
    });
    bind(DiagStatusServiceMBean.class).to(DiagStatusServiceMBeanImpl.class);
}
Also used : ServiceStatusProvider(org.opendaylight.infrautils.diagstatus.ServiceStatusProvider) SystemState(org.opendaylight.infrautils.ready.SystemState) TypeLiteral(com.google.inject.TypeLiteral) SystemReadyListener(org.opendaylight.infrautils.ready.SystemReadyListener) DiagStatusServiceMBean(org.opendaylight.infrautils.diagstatus.DiagStatusServiceMBean) DiagStatusService(org.opendaylight.infrautils.diagstatus.DiagStatusService) SystemReadyMonitor(org.opendaylight.infrautils.ready.SystemReadyMonitor) OsgiService(org.ops4j.pax.cdi.api.OsgiService)

Aggregations

TypeLiteral (com.google.inject.TypeLiteral)1 DiagStatusService (org.opendaylight.infrautils.diagstatus.DiagStatusService)1 DiagStatusServiceMBean (org.opendaylight.infrautils.diagstatus.DiagStatusServiceMBean)1 ServiceStatusProvider (org.opendaylight.infrautils.diagstatus.ServiceStatusProvider)1 SystemReadyListener (org.opendaylight.infrautils.ready.SystemReadyListener)1 SystemReadyMonitor (org.opendaylight.infrautils.ready.SystemReadyMonitor)1 SystemState (org.opendaylight.infrautils.ready.SystemState)1 OsgiService (org.ops4j.pax.cdi.api.OsgiService)1