geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: incubator-geronimo/specs/j2ee-management/src/java/org/apache/management/j2ee NotificationType.java
Date Mon, 18 Aug 2003 23:03:55 GMT
dain        2003/08/18 16:03:55

  Modified:    specs/j2ee-management/src/java/org/apache/management/j2ee
                        NotificationType.java
  Log:
  Changed to a static utility class.
  
  Revision  Changes    Path
  1.2       +22 -13    incubator-geronimo/specs/j2ee-management/src/java/org/apache/management/j2ee/NotificationType.java
  
  Index: NotificationType.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/specs/j2ee-management/src/java/org/apache/management/j2ee/NotificationType.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NotificationType.java	18 Aug 2003 13:29:30 -0000	1.1
  +++ NotificationType.java	18 Aug 2003 23:03:55 -0000	1.2
  @@ -61,55 +61,59 @@
   import javax.management.NotificationFilter;
   
   /**
  - *
  + * Static constants class which contains all of the J2EE notification types from the
  + * J2EE management specification.
    *
    * @version $Revision$ $Date$
    */
  -public interface NotificationType {
  +public final class NotificationType {
  +    private NotificationType() {
  +    }
  +
       /**
        * A new managed object was created.
        */
  -    String OBJECT_CREATED = "j2ee.object.created";
  +    public static final String OBJECT_CREATED = "j2ee.object.created";
   
       /**
        * A managed object was deleted
        */
  -    String OBJECT_DELETED = "j2ee.object.deleted";
  +    public static final String OBJECT_DELETED = "j2ee.object.deleted";
   
       /**
        * A state manageable object entered the starting state
        */
  -    String STATE_STARTING = "j2ee.state.starting";
  +    public static final String STATE_STARTING = "j2ee.state.starting";
   
       /**
        * A state manageable object entered the running state
        */
  -    String STATE_RUNNING = "j2ee.state.running";
  +    public static final String STATE_RUNNING = "j2ee.state.running";
   
       /**
        * A state manageable object entered the stopping state
        */
  -    String STATE_STOPPING = "j2ee.state.stopping";
  +    public static final String STATE_STOPPING = "j2ee.state.stopping";
   
       /**
        * A state manageable object entered the stopped state.
        */
  -    String STATE_STOPPED = "j2ee.state.stopped";
  +    public static final String STATE_STOPPED = "j2ee.state.stopped";
   
       /**
        * A state manageable object entered the failed state
        */
  -    String STATE_FAILED = "j2ee.state.failed";
  +    public static final String STATE_FAILED = "j2ee.state.failed";
   
       /**
        * An attribute has change value
        */
  -    String ATTRIBUTE_CHANGED = "j2ee.attribute.changed";
  +    public static final String ATTRIBUTE_CHANGED = "j2ee.attribute.changed";
   
       /**
        * An array containg all of the know J2EE notification types
        */
  -    String[] TYPES = new String[]{
  +    public static final String[] TYPES = new String[]{
           OBJECT_CREATED, OBJECT_DELETED,
           STATE_STARTING, STATE_RUNNING, STATE_STOPPING, STATE_STOPPED, STATE_FAILED,
           ATTRIBUTE_CHANGED
  @@ -118,7 +122,12 @@
       /**
        * A notification filter which lets all J2EE notifications pass
        */
  -    NotificationFilter NOTIFICATION_FILTER = new NotificationFilter() {
  +    public static final NotificationFilter NOTIFICATION_FILTER = new J2EENotificationFilter();
  +
  +    private static final class J2EENotificationFilter implements NotificationFilter {
  +        private J2EENotificationFilter() {
  +        }
  +
           public boolean isNotificationEnabled(Notification notification) {
               String type = notification.getType();
               for (int i = 0; i < TYPES.length; i++) {
  
  
  

Mime
View raw message