KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > hero > util > TimerFilter


1 /*
2 *
3 * TimerFilter.java -
4 * Copyright (C) 2002 Ecoo Team
5 * omontala@tinet.org
6 *
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */

22
23 package hero.util;
24
25 import javax.management.Notification JavaDoc;
26 import javax.management.NotificationFilter JavaDoc;
27
28   //
29
// Notification filter implementation.
30
//
31
public class TimerFilter implements NotificationFilter JavaDoc {
32             
33     public TimerFilter() {
34     }
35       
36     public boolean isNotificationEnabled(Notification JavaDoc n) {
37                                 
38         if (((String JavaDoc)n.getUserData()).equals("bonita")) {
39           return true;
40       }
41       return false;
42     }
43   }
44
Popular Tags