use of javax.management.Notification 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);
}
use of javax.management.Notification in project geode by apache.
the class DistributedSystemBridge method memberSuspect.
public void memberSuspect(InternalDistributedMember id, InternalDistributedMember whoSuspected) {
Notification notification = new Notification(JMXNotificationType.CACHE_MEMBER_SUSPECT, MBeanJMXAdapter.getMemberNameOrId(id), SequenceNumber.next(), System.currentTimeMillis(), ManagementConstants.CACHE_MEMBER_SUSPECT_PREFIX + MBeanJMXAdapter.getMemberNameOrId(id) + " By : " + whoSuspected.getName());
systemLevelNotifEmitter.sendNotification(notification);
}
use of javax.management.Notification in project geode by apache.
the class DistributedSystemBridge method memberJoined.
public void memberJoined(InternalDistributedMember id) {
Notification notification = new Notification(JMXNotificationType.CACHE_MEMBER_JOINED, MBeanJMXAdapter.getMemberNameOrId(id), SequenceNumber.next(), System.currentTimeMillis(), ManagementConstants.CACHE_MEMBER_JOINED_PREFIX + MBeanJMXAdapter.getMemberNameOrId(id));
systemLevelNotifEmitter.sendNotification(notification);
}
use of javax.management.Notification in project geode by apache.
the class DistributedSystemBridge method memberDeparted.
public void memberDeparted(InternalDistributedMember id, boolean crashed) {
Notification notification = new Notification(JMXNotificationType.CACHE_MEMBER_DEPARTED, MBeanJMXAdapter.getMemberNameOrId(id), SequenceNumber.next(), System.currentTimeMillis(), ManagementConstants.CACHE_MEMBER_DEPARTED_PREFIX + MBeanJMXAdapter.getMemberNameOrId(id) + " has crashed = " + crashed);
systemLevelNotifEmitter.sendNotification(notification);
}
use of javax.management.Notification in project geode by apache.
the class ManagementAdapter method handleGatewaySenderStart.
public void handleGatewaySenderStart(GatewaySender sender) throws ManagementException {
if (!isServiceInitialised("handleGatewaySenderStart")) {
return;
}
if ((sender.getRemoteDSId() < 0)) {
return;
}
GatewaySenderMBean bean = (GatewaySenderMBean) service.getLocalGatewaySenderMXBean(sender.getId());
bean.getBridge().setDispatcher();
Notification notification = new Notification(JMXNotificationType.GATEWAY_SENDER_STARTED, memberSource, SequenceNumber.next(), System.currentTimeMillis(), ManagementConstants.GATEWAY_SENDER_STARTED_PREFIX + sender.getId());
memberLevelNotifEmitter.sendNotification(notification);
}
Aggregations