All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opendaylight.infrautils.ready.spi.DelegatingSystemReadyMonitorMXBean Maven / Gradle / Ivy

Go to download

Provides interfaces for monitoring and handling system readiness state changes

The newest version!
/*
 * Copyright (c) 2018 Red Hat, Inc. and others. All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */
package org.opendaylight.infrautils.ready.spi;

import org.opendaylight.infrautils.ready.SystemReadyMonitorMXBean;
import org.opendaylight.infrautils.ready.SystemState;

/**
 * SystemReadyMonitorMXBean implementation.
 *
 * @author Michael Vorburger.ch, based on code by Faseela originally in KarafSystemReady
 */
public class DelegatingSystemReadyMonitorMXBean extends AbstractMXBean implements SystemReadyMonitorMXBean {

    private static final String JMX_OBJECT_NAME = "SystemState";
    private static final String MBEAN_TYPE = "ready";

    private final SystemReadyMonitorMXBean delegate;

    public DelegatingSystemReadyMonitorMXBean(SystemReadyMonitorMXBean delegate) {
        super(JMX_OBJECT_NAME, MBEAN_TYPE, null);
        this.delegate = delegate;
    }

    @Override
    public SystemState getSystemState() {
        return delegate.getSystemState();
    }

    @Override
    public String getFailureCause() {
        return delegate.getFailureCause();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy