View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.api.context.notification;
8   
9   
10  public interface ServerNotificationHandler
11  {
12      void fireNotification(ServerNotification notification);
13  
14      boolean isNotificationDynamic();
15  
16      /**
17       * @since 3.0
18       */
19      boolean isListenerRegistered(ServerNotificationListener listener);
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<? extends ServerNotification> notfnClass);
31  
32  }