Search in sources :

Example 1 with AsyncEventQueueMXBean

use of org.apache.geode.management.AsyncEventQueueMXBean in project geode by apache.

the class ManagementAdapter method handleAsyncEventQueueCreation.

public void handleAsyncEventQueueCreation(AsyncEventQueue queue) throws ManagementException {
    if (!isServiceInitialised("handleAsyncEventQueueCreation")) {
        return;
    }
    AsyncEventQueueMBeanBridge bridge = new AsyncEventQueueMBeanBridge(queue);
    AsyncEventQueueMXBean queueMBean = new AsyncEventQueueMBean(bridge);
    ObjectName senderObjectName = MBeanJMXAdapter.getAsycnEventQueueMBeanName(internalCache.getDistributedSystem().getDistributedMember(), queue.getId());
    ObjectName changedMBeanName = service.registerInternalMBean(queueMBean, senderObjectName);
    service.federate(changedMBeanName, AsyncEventQueueMXBean.class, true);
    Notification notification = new Notification(JMXNotificationType.ASYNC_EVENT_QUEUE_CREATED, memberSource, SequenceNumber.next(), System.currentTimeMillis(), ManagementConstants.ASYNC_EVENT_QUEUE_CREATED_PREFIX);
    memberLevelNotifEmitter.sendNotification(notification);
}
Also used : AsyncEventQueueMXBean(org.apache.geode.management.AsyncEventQueueMXBean) Notification(javax.management.Notification) ObjectName(javax.management.ObjectName)

Aggregations

Notification (javax.management.Notification)1 ObjectName (javax.management.ObjectName)1 AsyncEventQueueMXBean (org.apache.geode.management.AsyncEventQueueMXBean)1