Refine search
/** * Invoked when a client has gracefully disconnected from this process or when this process has * gracefully disconnected from a CacheServer. */ @Override public void memberLeft(ClientMembershipEvent event) { Notification notification = new Notification(JMXNotificationType.CLIENT_LEFT, serverSource, SequenceNumber.next(), System.currentTimeMillis(), ManagementConstants.CLIENT_LEFT_PREFIX + event.getMemberId()); serverLevelNotifEmitter.sendNotification(notification); memberLevelNotifEmitter.sendNotification(notification); }
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException { nbs.removeNotificationListener(listener); }
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, java.lang.Object handback) { nbs.addNotificationListener(listener, filter, handback); }
NotificationFilter filter = (NotificationFilter) args[1]; Object handback = args[2]; emitter.addNotificationListener(listener, filter, handback); delegateToFucntionService(objectName, methodName, null, signature); return null; emitter.removeNotificationListener(listener); NotificationFilter filter = (NotificationFilter) args[1]; Object handback = args[2]; emitter.removeNotificationListener(listener, filter, handback);
protected void notifyJmx(String query, String type) { try { long sequence = notifySequence.incrementAndGet(); if (isNotifyPool()) { if (this.pool!=null && this.pool.getJmxPool()!=null) { this.pool.getJmxPool().notify(type, query); } } else { if (notifier!=null) { Notification notification = new Notification(type, this, sequence, System.currentTimeMillis(), query); notifier.sendNotification(notification); } } } catch (RuntimeOperationsException e) { if (log.isDebugEnabled()) { log.debug("Unable to send failed query notification.",e); } } }
@Override public void progress(String tag, ProgressEvent event) { if (tag.startsWith("repair:")) { Optional<int[]> legacyUserData = getLegacyUserdata(tag, event); if (legacyUserData.isPresent()) { Notification jmxNotification = new Notification("repair", jmxObjectName, notificationSerialNumber.incrementAndGet(), event.getMessage()); jmxNotification.setUserData(legacyUserData.get()); broadcaster.sendNotification(jmxNotification); } } }
@Override protected void initInternal() throws LifecycleException { super.initInternal(); // Register the naming resources if (namingResources != null) { namingResources.init(); } // Send j2ee.object.created notification if (this.getObjectName() != null) { Notification notification = new Notification("j2ee.object.created", this.getObjectName(), sequenceNumber.getAndIncrement()); broadcaster.sendNotification(notification); } }
@Override protected void initInternal() throws LifecycleException { super.initInternal(); if (processTlds) { this.addLifecycleListener(new TldConfig()); } // Register the naming resources if (namingResources != null) { onameNamingResources = register(namingResources, "type=NamingResources," + getObjectNameKeyProperties()); } // Send j2ee.object.created notification if (this.getObjectName() != null) { Notification notification = new Notification("j2ee.object.created", this.getObjectName(), sequenceNumber.getAndIncrement()); broadcaster.sendNotification(notification); } }
@Override public void progress(String tag, ProgressEvent event) { Notification notification = new Notification("progress", tag, notificationSerialNumber.getAndIncrement(), System.currentTimeMillis(), event.getMessage()); Map<String, Integer> userData = new HashMap<>(); userData.put("type", event.getType().ordinal()); userData.put("progressCount", event.getProgressCount()); userData.put("total", event.getTotal()); notification.setUserData(userData); broadcaster.sendNotification(notification); } }
public void addNotification(Date timestamp, String notification) { broadcaster.sendNotification(new Notification(event, broadcaster, sequenceNumber.getAndIncrement(), timestamp.getTime(), notification)); notifications.add(NOTIFICATION_TIME.format(timestamp) + notification); }
@Override public void statusChanged(Status inOldStatus, Status inNewStatus) { notificationDelegate.sendNotification(new AttributeChangeNotification(this, jmxNotificationCounter.getAndIncrement(), System.currentTimeMillis(), STATUS_CHANGED.getText(), "Status", //$NON-NLS-1$ "String", //$NON-NLS-1$ inOldStatus, inNewStatus)); } /* (non-Javadoc)
public void addAppenderEvent(Category logger, Appender appender) { log.debug("addAppenderEvent called: logger="+logger.getName()+ ", appender="+appender.getName()); Notification n = new Notification(ADD_APPENDER+logger.getName(), this, 0); n.setUserData(appender); log.debug("sending notification."); nbs.sendNotification(n); }
public synchronized void init() throws Exception { super.init(); // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(INIT_EVENT, null); // Send j2ee.state.starting notification if (this.getObjectName() != null) { Notification notification = new Notification("j2ee.state.starting", this.getObjectName(), sequenceNumber++); broadcaster.sendNotification(notification); } }
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException { if( nSupport==null ) nSupport=new NotificationBroadcasterSupport(); nSupport.addNotificationListener(listener, filter, handback); }
/** * * @param member member to which this MBean belongs * @param objectName ObjectName of the MBean * @param monitoringRegion corresponding MonitoringRegion */ private MBeanProxyInvocationHandler(DistributedMember member, ObjectName objectName, Region<String, Object> monitoringRegion, boolean isMXBean) throws IntrospectionException, ClassNotFoundException { this.member = member; this.objectName = objectName; this.monitoringRegion = monitoringRegion; this.emitter = new NotificationBroadcasterSupport(); this.proxyImpl = new ProxyInterfaceImpl(); this.isMXBean = isMXBean; }
@Override public void handleNotification(Notification notification, Object handback) { notification.setSequenceNumber(SequenceNumber.next()); systemLevelNotifEmitter.sendNotification(notification); } }
/** * As this proxy may behave as an notification emitter it delegates to the member * NotificationBroadcasterSupport object * */ private void sendNotification(Object notification) { emitter.sendNotification((Notification) notification); }
public void sendNotification(Notification notification) { if (broadcaster == null) { broadcaster = ((StandardEngine)getParent().getParent()).getService().getBroadcaster(); } if (broadcaster != null) { broadcaster.sendNotification(notification); } return; }
public MBeanNotificationInfo[] getNotificationInfo(){ return nbs.getNotificationInfo(); }
private void sendNotification(final NotificationType type, final String message) { Notification notif = new Notification(type.toString(), this, notifSeq.incrementAndGet(), message); broadcaster.sendNotification(notif); }