Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   * Licensed to the Apache Software Foundation (ASF) under one or more
   * contributor license agreements.  See the NOTICE file distributed with
   * this work for additional information regarding copyright ownership.
   * The ASF licenses this file to You under the Apache License, Version 2.0
   * (the "License"); you may not use this file except in compliance with
   * the License.  You may obtain a copy of the License at
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
 package org.apache.tomcat.util.modeler;

Internal configuration information for a Notification descriptor.

Craig R. McClanahan
$Revision: 1237 $ $Date: 2009-11-03 02:55:48 +0100 (Tue, 03 Nov 2009) $
 public class NotificationInfo extends FeatureInfo implements Serializable {
     static final long serialVersionUID = -6319885418912650856L;
     // ----------------------------------------------------- Instance Variables

The ModelMBeanNotificationInfo object that corresponds to this NotificationInfo instance.
     transient MBeanNotificationInfo info = null;
     protected String notifTypes[] = new String[0];
     // ------------------------------------------------------------- Properties

Override the description property setter.

description The new description
     public void setDescription(String description) {
         this. = null;

Override the name property setter.

name The new name
     public void setName(String name) {
         this. = null;

The set of notification types for this MBean.
     public String[] getNotifTypes() {
         return (this.);
     // --------------------------------------------------------- Public Methods

Add a new notification type to the set managed by an MBean.

notifType The new notification type
     public void addNotifType(String notifType) {
         synchronized () {
             String results[] = new String[. + 1];
             System.arraycopy(, 0, results, 0, .);
             results[.] = notifType;
              = results;
             this. = null;

Create and return a ModelMBeanNotificationInfo object that corresponds to the attribute described by this instance.
        // Return our cached information (if any)
        if ( != null)
            return ();
        // Create and return a new information object
         = new MBeanNotificationInfo
            (getNotifTypes(), getName(), getDescription());
        //Descriptor descriptor = info.getDescriptor();
        return ();

Return a string representation of this notification descriptor.
    public String toString() {
        StringBuilder sb = new StringBuilder("NotificationInfo[");
        sb.append(", description=");
        sb.append(", notifTypes=");
        return (sb.toString());
New to GrepCode? Check out our FAQ X