List of usage examples for javax.management Notification Notification
public Notification(String type, Object source, long sequenceNumber, long timeStamp, String message)
From source file:org.apache.geode.management.internal.beans.ManagementAdapter.java
public void handleGatewaySenderStop(GatewaySender sender) throws ManagementException { if (!isServiceInitialised("handleGatewaySenderStop")) { return;//from w w w . j ava 2 s . com } Notification notification = new Notification(JMXNotificationType.GATEWAY_SENDER_STOPPED, memberSource, SequenceNumber.next(), System.currentTimeMillis(), ManagementConstants.GATEWAY_SENDER_STOPPED_PREFIX + sender.getId()); memberLevelNotifEmitter.sendNotification(notification); }
From source file:org.apache.geode.management.internal.beans.ManagementAdapter.java
public void handleGatewaySenderPaused(GatewaySender sender) throws ManagementException { if (!isServiceInitialised("handleGatewaySenderPaused")) { return;/*from w w w . j av a 2s .c om*/ } Notification notification = new Notification(JMXNotificationType.GATEWAY_SENDER_PAUSED, memberSource, SequenceNumber.next(), System.currentTimeMillis(), ManagementConstants.GATEWAY_SENDER_PAUSED_PREFIX + sender.getId()); memberLevelNotifEmitter.sendNotification(notification); }
From source file:org.apache.geode.management.internal.beans.ManagementAdapter.java
public void handleGatewaySenderResumed(GatewaySender sender) throws ManagementException { if (!isServiceInitialised("handleGatewaySenderResumed")) { return;//from w w w . ja v a 2 s . c o m } Notification notification = new Notification(JMXNotificationType.GATEWAY_SENDER_RESUMED, memberSource, SequenceNumber.next(), System.currentTimeMillis(), ManagementConstants.GATEWAY_SENDER_RESUMED_PREFIX + sender.getId()); memberLevelNotifEmitter.sendNotification(notification); }
From source file:org.apache.geode.management.internal.beans.ManagementAdapter.java
public void handleCacheServiceCreation(CacheService cacheService) throws ManagementException { if (!isServiceInitialised("handleCacheServiceCreation")) { return;/*from ww w. j a v a2s .co m*/ } // Don't register the CacheServices in the Locator InternalDistributedMember member = internalCache.getInternalDistributedSystem().getDistributedMember(); if (member.getVmKind() == DistributionManager.LOCATOR_DM_TYPE) { return; } CacheServiceMBeanBase mbean = cacheService.getMBean(); if (mbean != null) { String id = mbean.getId(); ObjectName cacheServiceObjectName = MBeanJMXAdapter.getCacheServiceMBeanName(member, id); ObjectName changedMBeanName = service.registerInternalMBean(mbean, cacheServiceObjectName); service.federate(changedMBeanName, mbean.getInterfaceClass(), true); Notification notification = new Notification(JMXNotificationType.CACHE_SERVICE_CREATED, memberSource, SequenceNumber.next(), System.currentTimeMillis(), ManagementConstants.CACHE_SERVICE_CREATED_PREFIX + id); memberLevelNotifEmitter.sendNotification(notification); } }
From source file:com.heliosapm.script.AbstractDeployedScript.java
/** * Sends a configuration change notification when the configuration of the deployment changes * @param jsonConfig The new configuration represented in JSON which is included as the user data in the sent notification * @param timestamp The timestamp/*www . j av a 2 s .co m*/ */ protected void sendConfigurationChangeNotification(final String jsonConfig, final long timestamp) { final String msg = String.format("[%s] Configuration change", new Date(timestamp)); // last event msg final Notification notif = new Notification(NOTIF_CONFIG_CHANGE, objectName, sequence.incrementAndGet(), timestamp, msg); notif.setUserData(jsonConfig); sendNotification(notif); }
From source file:org.apache.geode.management.internal.beans.DistributedSystemBridge.java
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); }
From source file:org.apache.geode.management.internal.beans.DistributedSystemBridge.java
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); }
From source file:org.apache.geode.management.internal.beans.DistributedSystemBridge.java
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); }