Search in sources :

Example 1 with JmxBroadcaster

use of org.apache.deltaspike.core.api.jmx.JmxBroadcaster in project deltaspike by apache.

the class BroadcasterProducer method jmxBroadcaster.

@Produces
@Dependent
public JmxBroadcaster jmxBroadcaster(final InjectionPoint ip) {
    final Class<?> declaringClass = ip.getMember().getDeclaringClass();
    final JmxBroadcaster broadcaster = extension.getBroadcasterFor(declaringClass);
    if (broadcaster == null) {
        //TODO discuss validation during bootstrapping
        throw new IllegalStateException("Invalid injection of " + JmxBroadcaster.class.getName() + " in " + declaringClass.getName() + " detected. It is required to annotate the class with @" + MBean.class.getName());
    }
    return broadcaster;
}
Also used : JmxBroadcaster(org.apache.deltaspike.core.api.jmx.JmxBroadcaster) Produces(javax.enterprise.inject.Produces) Dependent(javax.enterprise.context.Dependent)

Aggregations

Dependent (javax.enterprise.context.Dependent)1 Produces (javax.enterprise.inject.Produces)1 JmxBroadcaster (org.apache.deltaspike.core.api.jmx.JmxBroadcaster)1