View Javadoc

1   /*
2    * $Id: ServerNotificationHandler.java 12269 2008-07-10 04:19:03Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.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  
17      void fireNotification(ServerNotification notification);
18  
19      boolean isNotificationDynamic();
20  
21      /**
22       * This returns a very "conservative" value - it is true if the notification or any subclass would be
23       * accepted.  So if it returns false then you can be sure that there is no need to send the
24       * notification.  On the other hand, if it returns true there is no guarantee that the notification
25       * "really" will be dispatched to any listener.
26       *
27       * @param notfnClass Either the notification class being generated or some superclass
28       * @return false if there is no need to dispatch the notification
29       */
30      boolean isNotificationEnabled(Class notfnClass);
31  
32  }