01: /*
02: * $Id: ServerNotificationHandler.java 10489 2008-01-23 17:53:38Z dfeist $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10:
11: package org.mule.api.context.notification;
12:
13: public interface ServerNotificationHandler {
14:
15: public void fireNotification(ServerNotification notification);
16:
17: public boolean isNotificationDynamic();
18:
19: /**
20: * This returns a very "conservative" value - it is true if the notification or any subclass would be
21: * accepted. So if it returns false then you can be sure that there is no need to send the
22: * notification. On the other hand, if it returns true there is no guarantee that the notification
23: * "really" will be dispatched to any listener.
24: *
25: * @param notfnClass Either the notification class being generated or some superclass
26: * @return false if there is no need to dispatch the notification
27: */
28: public boolean isNotificationEnabled(Class notfnClass);
29:
30: }
|