1 23 package com.sun.enterprise.admin.alert; 24 25 import javax.management.NotificationListener ; 26 import javax.management.NotificationFilter ; 27 28 import java.util.List ; 29 import java.util.ArrayList ; 30 import java.util.StringTokenizer ; 31 32 39 public class AlertSubscriptionInfo { 40 private List monitorNames; 42 43 private NotificationListener listener; 45 46 private NotificationFilter filter; 48 49 53 public AlertSubscriptionInfo(String subscribeListenersWith, 54 NotificationListener listener, NotificationFilter filter ) 55 { 56 StringTokenizer tokenizer = 59 new StringTokenizer ( subscribeListenersWith, "," ); 60 ArrayList list = new ArrayList ( ); 61 while( tokenizer.hasMoreTokens( ) ) { 62 String monitorName = tokenizer.nextToken( ); 63 list.add( monitorName.trim() ); 64 } 65 monitorNames = list; 66 this.listener = listener; 67 this.filter = filter; 68 } 69 70 List getMonitorNames( ) { 71 return monitorNames; 72 } 73 74 NotificationListener getNotificationListener( ) { 75 return listener; 76 } 77 78 NotificationFilter getNotificationFilter( ) { 79 return filter; 80 } 81 } 82 | Popular Tags |