FileDocCategorySizeDatePackage
NotificationInfo.javaAPI DocApache Tomcat 6.0.144140Fri Jul 20 04:20:34 BST 2007org.apache.tomcat.util.modeler

NotificationInfo

public class NotificationInfo extends FeatureInfo implements Serializable

Internal configuration information for a Notification descriptor.

author
Craig R. McClanahan
version
$Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $

Fields Summary
static final long
serialVersionUID
transient MBeanNotificationInfo
info
The ModelMBeanNotificationInfo object that corresponds to this NotificationInfo instance.
protected String[]
notifTypes
Constructors Summary
Methods Summary
public voidaddNotifType(java.lang.String notifType)
Add a new notification type to the set managed by an MBean.

param
notifType The new notification type


        synchronized (notifTypes) {
            String results[] = new String[notifTypes.length + 1];
            System.arraycopy(notifTypes, 0, results, 0, notifTypes.length);
            results[notifTypes.length] = notifType;
            notifTypes = results;
            this.info = null;
        }

    
public javax.management.MBeanNotificationInfocreateNotificationInfo()
Create and return a ModelMBeanNotificationInfo object that corresponds to the attribute described by this instance.


        // Return our cached information (if any)
        if (info != null)
            return (info);

        // Create and return a new information object
        info = new MBeanNotificationInfo
            (getNotifTypes(), getName(), getDescription());
        //Descriptor descriptor = info.getDescriptor();
        //addFields(descriptor);
        //info.setDescriptor(descriptor);
        return (info);

    
public java.lang.String[]getNotifTypes()
The set of notification types for this MBean.

        return (this.notifTypes);
    
public voidsetDescription(java.lang.String description)
Override the description property setter.

param
description The new description


    // ------------------------------------------------------------- Properties


                   
        
        super.setDescription(description);
        this.info = null;
    
public voidsetName(java.lang.String name)
Override the name property setter.

param
name The new name

        super.setName(name);
        this.info = null;
    
public java.lang.StringtoString()
Return a string representation of this notification descriptor.


        StringBuffer sb = new StringBuffer("NotificationInfo[");
        sb.append("name=");
        sb.append(name);
        sb.append(", description=");
        sb.append(description);
        sb.append(", notifTypes=");
        sb.append(notifTypes.length);
        sb.append("]");
        return (sb.toString());