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

org.apache.deltaspike.core.api.jmx.MBean Maven / Gradle / Ivy

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you 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 or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.apache.deltaspike.core.api.jmx;

import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * This annotation marks a CDI managed bean as exported through JMX.
 */
@Retention(RUNTIME)
@Target(TYPE)
@Inherited
public @interface MBean
{
    /**
     * @return the category to use if no objectName was specified. Default is "org.apache.deltaspike"
     * and can be overriden either directly by the value or by a key used to resolve a value using
     * {@see org.apache.deltaspike.core.api.config.ConfigResolver}. It is a key if the value is
     * between bracket. Default key is "org.apache.deltaspike.mbean.category".
     */
    String category() default "{org.apache.deltaspike.mbean.category}";

    /**
     * @return the name of the bean used if no objectName was specified.
     * It is used with category value to create the MBean {@see javax.management.ObjectName}
     * using the following pattern: <category>:type=MBeans,name=<name>
     */
    String name() default "";

    /**
     * @return the direct object name used to export the decorated bean.
     */
    String objectName() default "";

    /**
     * @return the description used to describe the JMX bean.
     */
    String description() default "";
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy