1 /* 2 * $Id: ServerNotificationHandler.java 20813 2010-12-21 11:37:48Z dirk.olmes $ 3 * -------------------------------------------------------------------------------------- 4 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com 5 * 6 * The software in this package is published under the terms of the CPAL v1.0 7 * license, a copy of which has been included with this distribution in the 8 * LICENSE.txt file. 9 */ 10 11 package org.mule.api.context.notification; 12 13 14 public interface ServerNotificationHandler 15 { 16 void fireNotification(ServerNotification notification); 17 18 boolean isNotificationDynamic(); 19 20 /** 21 * @since 3.0 22 */ 23 boolean isListenerRegistered(ServerNotificationListener listener); 24 25 /** 26 * This returns a very "conservative" value - it is true if the notification or any subclass would be 27 * accepted. So if it returns false then you can be sure that there is no need to send the 28 * notification. On the other hand, if it returns true there is no guarantee that the notification 29 * "really" will be dispatched to any listener. 30 * 31 * @param notfnClass Either the notification class being generated or some superclass 32 * @return false if there is no need to dispatch the notification 33 */ 34 boolean isNotificationEnabled(Class<? extends ServerNotification> notfnClass); 35 36 }