public void sendNotification(Notification notification) { notificationDelegate.sendNotification(notification); }
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) { notificationDelegate .addNotificationListener(listener, filter, handback); }
/** * removeNotificationListener delegates to our broadcaster object * * @param listener a <code>NotificationListener</code> value * @exception ListenerNotFoundException if an error occurs */ public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException { broadcaster.removeNotificationListener(listener); }
/** * Notify of an event * * @param event the event * @param userData any user data, e.g. the exception on a failure */ protected void sendNotification(String event, Object userData) { if (emitter == null) return; try { Notification notif = new Notification(event, spec, emitter.nextNotificationSequenceNumber()); notif.setUserData(userData); emitter.sendNotification(notif); } catch (Throwable t) { log.warn("Error sending notification: " + event, t); } }
/** * The <code>getNextNotificationSequenceNumber</code> method returns * the next sequence number for use in notifications. * * @return a <code>long</code> value */ protected long getNextNotificationSequenceNumber() { return super.nextNotificationSequenceNumber(); }
public void handleNotification(NotificationListener listener, Notification notification, Object handback) { notificationDelegate.handleNotification(listener, notification, handback); }
/** * Sends outs controller notifications about service lifecycle events * * @param type the notification type * @param serviceName the service name */ public void sendControllerNotification(String type, ObjectName serviceName) { Notification notification = new Notification(type, this, super.nextNotificationSequenceNumber()); notification.setUserData(serviceName); sendNotification(notification); }
public void sendNotification(Notification notification) { ListenerRegistry.ListenerRegistrationIterator iterator = registry.iterator(); while (iterator.hasNext()) { ListenerRegistration registration = iterator.nextRegistration(); NotificationFilter filter = registration.getFilter(); if (filter == null) handleNotification(registration.getListener(), notification, registration.getHandback()); else if (filter.isNotificationEnabled(notification)) handleNotification(registration.getListener(), notification, registration.getHandback()); } }
public void run() { broadcaster.sendNotification(new NetworkNotification(objectName, NetworkNotification.SERVER_UPDATED, identity, invokers)); } }.start();
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException { notifier.removeNotificationListener(listener, filter, handback); }
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) { notifier.addNotificationListener(listener, filter, handback); }
/** * Sends outs controller notifications about service lifecycle events * * @param type the notification type * @param serviceName the service name */ public void sendControllerNotification(String type, ObjectName serviceName) { Notification notification = new Notification(type, this, super.nextNotificationSequenceNumber()); notification.setUserData(serviceName); sendNotification(notification); }
public void run() { broadcaster.sendNotification(new NetworkNotification(objectName, NetworkNotification.SERVER_ADDED, identity, invokers)); } }.start();
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException { notifier.removeNotificationListener(listener, filter, handback); }
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) { notifier.addNotificationListener(listener, filter, handback); }
public void run() { broadcaster.sendNotification(new NetworkNotification(objectName, NetworkNotification.SERVER_REMOVED, identity, il)); } }.start();
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException { notificationDelegate.removeNotificationListener(listener, filter, handback); }
/** * addNotificationListener delegates to the broadcaster object we hold. * * @param listener a <code>NotificationListener</code> value * @param filter a <code>NotificationFilter</code> value * @param handback an <code>Object</code> value * @exception IllegalArgumentException if an error occurs */ public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException { broadcaster.addNotificationListener(listener, filter, handback); }
/** * Sends a notification. * * @param ntfyObj notification to send */ public void sendNotification(Notification ntfyObj) throws MBeanException, RuntimeOperationsException { if( ntfyObj == null ) { throw new RuntimeOperationsException( new IllegalArgumentException("ntfyText cannot be null") ); } notifier.sendNotification(ntfyObj); }
/** * removeNotificationListener delegates to our broadcaster object * * @param listener a <code>NotificationListener</code> value * @exception ListenerNotFoundException if an error occurs */ public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException { broadcaster.removeNotificationListener(listener); }