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);
}
use of javax.management.Notification in project geode by apache.
the class ManagementAdapter method handleAsyncEventQueueRemoval.
/**
* Handles AsyncEventQueue Removal
*
* @param queue The AsyncEventQueue being removed
*/
public void handleAsyncEventQueueRemoval(AsyncEventQueue queue) throws ManagementException {
if (!isServiceInitialised("handleAsyncEventQueueRemoval")) {
return;
}
ObjectName asycnEventQueueMBeanName = MBeanJMXAdapter.getAsycnEventQueueMBeanName(internalCache.getDistributedSystem().getDistributedMember(), queue.getId());
AsyncEventQueueMBean bean;
try {
bean = (AsyncEventQueueMBean) service.getLocalAsyncEventQueueMXBean(queue.getId());
if (bean == null) {
return;
}
} catch (ManagementException e) {
// If no bean found its a NO-OP
if (logger.isDebugEnabled()) {
logger.debug(e.getMessage(), e);
}
return;
}
bean.stopMonitor();
service.unregisterMBean(asycnEventQueueMBeanName);
Notification notification = new Notification(JMXNotificationType.ASYNC_EVENT_QUEUE_CLOSED, memberSource, SequenceNumber.next(), System.currentTimeMillis(), ManagementConstants.ASYNC_EVENT_QUEUE_CLOSED_PREFIX + queue.getId());
memberLevelNotifEmitter.sendNotification(notification);
}
Aggregations