Search in sources :

Example 1 with JmxFeatureEvent

use of org.apache.karaf.features.management.codec.JmxFeatureEvent in project karaf by apache.

the class FeaturesServiceMBeanImpl method getFeaturesListener.

public FeaturesListener getFeaturesListener() {
    return new FeaturesListener() {

        public void featureEvent(FeatureEvent event) {
            if (!event.isReplay()) {
                Notification notification = new Notification(FEATURE_EVENT_TYPE, objectName, sequenceNumber++);
                notification.setUserData(new JmxFeatureEvent(event).asCompositeData());
                sendNotification(notification);
            }
        }

        public void repositoryEvent(RepositoryEvent event) {
            if (!event.isReplay()) {
                Notification notification = new Notification(REPOSITORY_EVENT_TYPE, objectName, sequenceNumber++);
                notification.setUserData(new JmxRepositoryEvent(event).asCompositeData());
                sendNotification(notification);
            }
        }
    };
}
Also used : FeaturesListener(org.apache.karaf.features.FeaturesListener) FeatureEvent(org.apache.karaf.features.FeatureEvent) JmxFeatureEvent(org.apache.karaf.features.management.codec.JmxFeatureEvent) RepositoryEvent(org.apache.karaf.features.RepositoryEvent) JmxRepositoryEvent(org.apache.karaf.features.management.codec.JmxRepositoryEvent) Notification(javax.management.Notification) JmxFeatureEvent(org.apache.karaf.features.management.codec.JmxFeatureEvent) JmxRepositoryEvent(org.apache.karaf.features.management.codec.JmxRepositoryEvent)

Aggregations

Notification (javax.management.Notification)1 FeatureEvent (org.apache.karaf.features.FeatureEvent)1 FeaturesListener (org.apache.karaf.features.FeaturesListener)1 RepositoryEvent (org.apache.karaf.features.RepositoryEvent)1 JmxFeatureEvent (org.apache.karaf.features.management.codec.JmxFeatureEvent)1 JmxRepositoryEvent (org.apache.karaf.features.management.codec.JmxRepositoryEvent)1