1 23 24 package com.sun.enterprise.admin.selfmanagement.event; 25 import javax.management.NotificationFilter ; 26 import javax.management.Notification ; 27 28 public class LifeCycleNotificationFilter implements NotificationFilter { 29 public LifeCycleNotificationFilter(String type) { 30 this.type = type; 31 } 32 33 public boolean isNotificationEnabled(Notification notification) { 34 if ("*".equals(type)) { 35 return true; 36 } 37 if (type.equals(notification.getType())) 38 return true; 39 else 40 return false; 41 } 42 private String type; 43 } 44 | Popular Tags |