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

patterntesting.runtime.monitor.AbstractMonitorMBean Maven / Gradle / Ivy

/*
 * $Id: AbstractMonitorMBean.java,v 1.1 2016/02/25 22:33:41 oboehm Exp $
 *
 * Copyright (c) 2016 by Oliver Boehm
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express orimplied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * (c)reated 25.02.2016 by oliver ([email protected])
 */

package patterntesting.runtime.monitor;

import patterntesting.runtime.jmx.Description;

/**
 * Some common interface methods for a monitor MBean are listed here.
 *
 * @author oliver
 * @since 1.6.1 (25.02.2016)
 * @version $Revision: 1.1 $
 */
public interface AbstractMonitorMBean {

    /**
     * To be able to register the instance as shutdown hook you can use this
     * (non static) method.
     */
    @Description("to register monitor as shutdown hook")
    void addMeAsShutdownHook();

    /**
     * If you want to unregister the instance as shutdown hook you can use this
     * method.
     *
     * @since 1.0
     */
    @Description("to de-register monitor as shutdown hook")
    void removeMeAsShutdownHook();

    /**
     * Here you can ask if the monitor was already registeres ad
     * shutdown hook.
     *
     * @return true if it is registered as shutdown hook.
     * @since 1.0
     */
    @Description("returns true if monitor was registered as shutdown hook")
    boolean isShutdownHook();

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy