javax.management.MBeanInfo#getNotifications ( )源码实例Demo

下面列出了javax.management.MBeanInfo#getNotifications ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: dragonwell8_jdk   文件: MXBeanInteropTest2.java
private void printMBeanInfo(MBeanInfo mbInfo) {
    System.out.println("Description " + mbInfo.getDescription());

    for (MBeanConstructorInfo ctor : mbInfo.getConstructors()) {
        System.out.println("Constructor " + ctor.getName());
    }

    for (MBeanAttributeInfo att : mbInfo.getAttributes()) {
        System.out.println("Attribute " + att.getName()
        + " [" + att.getType() + "]");
    }

    for (MBeanOperationInfo oper : mbInfo.getOperations()) {
        System.out.println("Operation " + oper.getName());
    }

    for (MBeanNotificationInfo notif : mbInfo.getNotifications()) {
        System.out.println("Notification " + notif.getName());
    }
}
 
源代码2 项目: dragonwell8_jdk   文件: MXBeanNotifTest.java
private int checkMBeanInfo(MBeanInfo mbi, Descriptor refDescr) {
    MBeanNotificationInfo[] notifsInfo = mbi.getNotifications();
    int res = 0;

    for (MBeanNotificationInfo mbni : notifsInfo) {
        if ( mbni.getDescriptor().equals(refDescr) ) {
            System.out.println("(OK)");
        } else {
            System.out.println("(ERROR) Descriptor of the notification is "
                    + mbni.getDescriptor()
                    + " as we expect "
                    + refDescr);
            res++;
        }
    }

    return res;
}
 
源代码3 项目: TencentKona-8   文件: MXBeanInteropTest2.java
private void printMBeanInfo(MBeanInfo mbInfo) {
    System.out.println("Description " + mbInfo.getDescription());

    for (MBeanConstructorInfo ctor : mbInfo.getConstructors()) {
        System.out.println("Constructor " + ctor.getName());
    }

    for (MBeanAttributeInfo att : mbInfo.getAttributes()) {
        System.out.println("Attribute " + att.getName()
        + " [" + att.getType() + "]");
    }

    for (MBeanOperationInfo oper : mbInfo.getOperations()) {
        System.out.println("Operation " + oper.getName());
    }

    for (MBeanNotificationInfo notif : mbInfo.getNotifications()) {
        System.out.println("Notification " + notif.getName());
    }
}
 
源代码4 项目: TencentKona-8   文件: MXBeanNotifTest.java
private int checkMBeanInfo(MBeanInfo mbi, Descriptor refDescr) {
    MBeanNotificationInfo[] notifsInfo = mbi.getNotifications();
    int res = 0;

    for (MBeanNotificationInfo mbni : notifsInfo) {
        if ( mbni.getDescriptor().equals(refDescr) ) {
            System.out.println("(OK)");
        } else {
            System.out.println("(ERROR) Descriptor of the notification is "
                    + mbni.getDescriptor()
                    + " as we expect "
                    + refDescr);
            res++;
        }
    }

    return res;
}
 
源代码5 项目: openjdk-jdk8u   文件: MXBeanInteropTest2.java
private void printMBeanInfo(MBeanInfo mbInfo) {
    System.out.println("Description " + mbInfo.getDescription());

    for (MBeanConstructorInfo ctor : mbInfo.getConstructors()) {
        System.out.println("Constructor " + ctor.getName());
    }

    for (MBeanAttributeInfo att : mbInfo.getAttributes()) {
        System.out.println("Attribute " + att.getName()
        + " [" + att.getType() + "]");
    }

    for (MBeanOperationInfo oper : mbInfo.getOperations()) {
        System.out.println("Operation " + oper.getName());
    }

    for (MBeanNotificationInfo notif : mbInfo.getNotifications()) {
        System.out.println("Notification " + notif.getName());
    }
}
 
源代码6 项目: openjdk-jdk8u   文件: MXBeanNotifTest.java
private int checkMBeanInfo(MBeanInfo mbi, Descriptor refDescr) {
    MBeanNotificationInfo[] notifsInfo = mbi.getNotifications();
    int res = 0;

    for (MBeanNotificationInfo mbni : notifsInfo) {
        if ( mbni.getDescriptor().equals(refDescr) ) {
            System.out.println("(OK)");
        } else {
            System.out.println("(ERROR) Descriptor of the notification is "
                    + mbni.getDescriptor()
                    + " as we expect "
                    + refDescr);
            res++;
        }
    }

    return res;
}
 
源代码7 项目: openjdk-jdk8u-backup   文件: MXBeanInteropTest2.java
private void printMBeanInfo(MBeanInfo mbInfo) {
    System.out.println("Description " + mbInfo.getDescription());

    for (MBeanConstructorInfo ctor : mbInfo.getConstructors()) {
        System.out.println("Constructor " + ctor.getName());
    }

    for (MBeanAttributeInfo att : mbInfo.getAttributes()) {
        System.out.println("Attribute " + att.getName()
        + " [" + att.getType() + "]");
    }

    for (MBeanOperationInfo oper : mbInfo.getOperations()) {
        System.out.println("Operation " + oper.getName());
    }

    for (MBeanNotificationInfo notif : mbInfo.getNotifications()) {
        System.out.println("Notification " + notif.getName());
    }
}
 
源代码8 项目: openjdk-jdk8u-backup   文件: MXBeanNotifTest.java
private int checkMBeanInfo(MBeanInfo mbi, Descriptor refDescr) {
    MBeanNotificationInfo[] notifsInfo = mbi.getNotifications();
    int res = 0;

    for (MBeanNotificationInfo mbni : notifsInfo) {
        if ( mbni.getDescriptor().equals(refDescr) ) {
            System.out.println("(OK)");
        } else {
            System.out.println("(ERROR) Descriptor of the notification is "
                    + mbni.getDescriptor()
                    + " as we expect "
                    + refDescr);
            res++;
        }
    }

    return res;
}
 
源代码9 项目: openjdk-jdk9   文件: MXBeanInteropTest2.java
private void printMBeanInfo(MBeanInfo mbInfo) {
    System.out.println("Description " + mbInfo.getDescription());

    for (MBeanConstructorInfo ctor : mbInfo.getConstructors()) {
        System.out.println("Constructor " + ctor.getName());
    }

    for (MBeanAttributeInfo att : mbInfo.getAttributes()) {
        System.out.println("Attribute " + att.getName()
        + " [" + att.getType() + "]");
    }

    for (MBeanOperationInfo oper : mbInfo.getOperations()) {
        System.out.println("Operation " + oper.getName());
    }

    for (MBeanNotificationInfo notif : mbInfo.getNotifications()) {
        System.out.println("Notification " + notif.getName());
    }
}
 
源代码10 项目: openjdk-jdk9   文件: MXBeanNotifTest.java
private int checkMBeanInfo(MBeanInfo mbi, Descriptor refDescr) {
    MBeanNotificationInfo[] notifsInfo = mbi.getNotifications();
    int res = 0;

    for (MBeanNotificationInfo mbni : notifsInfo) {
        if ( mbni.getDescriptor().equals(refDescr) ) {
            System.out.println("(OK)");
        } else {
            System.out.println("(ERROR) Descriptor of the notification is "
                    + mbni.getDescriptor()
                    + " as we expect "
                    + refDescr);
            res++;
        }
    }

    return res;
}
 
源代码11 项目: jdk8u-jdk   文件: MXBeanInteropTest2.java
private void printMBeanInfo(MBeanInfo mbInfo) {
    System.out.println("Description " + mbInfo.getDescription());

    for (MBeanConstructorInfo ctor : mbInfo.getConstructors()) {
        System.out.println("Constructor " + ctor.getName());
    }

    for (MBeanAttributeInfo att : mbInfo.getAttributes()) {
        System.out.println("Attribute " + att.getName()
        + " [" + att.getType() + "]");
    }

    for (MBeanOperationInfo oper : mbInfo.getOperations()) {
        System.out.println("Operation " + oper.getName());
    }

    for (MBeanNotificationInfo notif : mbInfo.getNotifications()) {
        System.out.println("Notification " + notif.getName());
    }
}
 
源代码12 项目: jdk8u-jdk   文件: MXBeanNotifTest.java
private int checkMBeanInfo(MBeanInfo mbi, Descriptor refDescr) {
    MBeanNotificationInfo[] notifsInfo = mbi.getNotifications();
    int res = 0;

    for (MBeanNotificationInfo mbni : notifsInfo) {
        if ( mbni.getDescriptor().equals(refDescr) ) {
            System.out.println("(OK)");
        } else {
            System.out.println("(ERROR) Descriptor of the notification is "
                    + mbni.getDescriptor()
                    + " as we expect "
                    + refDescr);
            res++;
        }
    }

    return res;
}
 
源代码13 项目: jdk8u_jdk   文件: MXBeanInteropTest2.java
private void printMBeanInfo(MBeanInfo mbInfo) {
    System.out.println("Description " + mbInfo.getDescription());

    for (MBeanConstructorInfo ctor : mbInfo.getConstructors()) {
        System.out.println("Constructor " + ctor.getName());
    }

    for (MBeanAttributeInfo att : mbInfo.getAttributes()) {
        System.out.println("Attribute " + att.getName()
        + " [" + att.getType() + "]");
    }

    for (MBeanOperationInfo oper : mbInfo.getOperations()) {
        System.out.println("Operation " + oper.getName());
    }

    for (MBeanNotificationInfo notif : mbInfo.getNotifications()) {
        System.out.println("Notification " + notif.getName());
    }
}
 
源代码14 项目: jdk8u_jdk   文件: MXBeanNotifTest.java
private int checkMBeanInfo(MBeanInfo mbi, Descriptor refDescr) {
    MBeanNotificationInfo[] notifsInfo = mbi.getNotifications();
    int res = 0;

    for (MBeanNotificationInfo mbni : notifsInfo) {
        if ( mbni.getDescriptor().equals(refDescr) ) {
            System.out.println("(OK)");
        } else {
            System.out.println("(ERROR) Descriptor of the notification is "
                    + mbni.getDescriptor()
                    + " as we expect "
                    + refDescr);
            res++;
        }
    }

    return res;
}
 
源代码15 项目: activemq-artemis   文件: AbstractControl.java
@Override
public MBeanInfo getMBeanInfo() {
   if (AuditLogger.isEnabled()) {
      AuditLogger.getMBeanInfo(this);
   }
   MBeanInfo info = super.getMBeanInfo();
   return new MBeanInfo(info.getClassName(), info.getDescription(), fillMBeanAttributeInfo(), info.getConstructors(), fillMBeanOperationInfo(), info.getNotifications());
}
 
源代码16 项目: cacheonix-core   文件: StandardAgent.java
private void printMBeanInfo(ObjectName mbeanObjectName, String mbeanName) {

	echo("\n>>> Getting the management information for the "+ mbeanName +" MBean");
	echo("    using the getMBeanInfo method of the MBeanServer");
	sleep(1000);
	MBeanInfo info = null;
	try {
	    info = server.getMBeanInfo(mbeanObjectName);
	} catch (Exception e) {
	    echo("\t!!! Could not get MBeanInfo object for "+ mbeanName +" !!!");
	    e.printStackTrace();
	    return;
	}
	echo("\nCLASSNAME: \t"+ info.getClassName());
	echo("\nDESCRIPTION: \t"+ info.getDescription());
	echo("\nATTRIBUTES");
	MBeanAttributeInfo[] attrInfo = info.getAttributes();
	if (attrInfo.length>0) {
	    for(int i=0; i<attrInfo.length; i++) {
		echo(" ** NAME: \t"+ attrInfo[i].getName());
		echo("    DESCR: \t"+ attrInfo[i].getDescription());
		echo("    TYPE: \t"+ attrInfo[i].getType() +
		     "\tREAD: "+ attrInfo[i].isReadable() +
		     "\tWRITE: "+ attrInfo[i].isWritable());
	    }
	} else echo(" ** No attributes **");
	echo("\nCONSTRUCTORS");
	MBeanConstructorInfo[] constrInfo = info.getConstructors();
	for(int i=0; i<constrInfo.length; i++) {
	    echo(" ** NAME: \t"+ constrInfo[i].getName());
	    echo("    DESCR: \t"+ constrInfo[i].getDescription());
	    echo("    PARAM: \t"+ constrInfo[i].getSignature().length +" parameter(s)");
	}
	echo("\nOPERATIONS");
	MBeanOperationInfo[] opInfo = info.getOperations();
	if (opInfo.length>0) {
	    for(int i=0; i<opInfo.length; i++) {
		echo(" ** NAME: \t"+ opInfo[i].getName());
		echo("    DESCR: \t"+ opInfo[i].getDescription());
		echo("    PARAM: \t"+ opInfo[i].getSignature().length +" parameter(s)");
	    }
	} else echo(" ** No operations ** ");
	echo("\nNOTIFICATIONS");
	MBeanNotificationInfo[] notifInfo = info.getNotifications();
	if (notifInfo.length>0) {
	    for(int i=0; i<notifInfo.length; i++) {
		echo(" ** NAME: \t"+ notifInfo[i].getName());
		echo("    DESCR: \t"+ notifInfo[i].getDescription());
	    }
	} else echo(" ** No notifications **");
    }
 
源代码17 项目: cacheonix-core   文件: DynamicAgent.java
private void printMBeanInfo(ObjectName mbeanObjectName, String mbeanName) {

	echo("\n>>> Getting the management information for the "+ mbeanName +" MBean");
	echo("    using the getMBeanInfo method of the MBeanServer");
	sleep(1000);
	MBeanInfo info = null;
	try {
	    info = server.getMBeanInfo(mbeanObjectName);
	} catch (Exception e) {
	    echo("\t!!! Could not get MBeanInfo object for "+ mbeanName +" !!!");
	    e.printStackTrace();
	    return;
	}
	echo("\nCLASSNAME: \t"+ info.getClassName());
	echo("\nDESCRIPTION: \t"+ info.getDescription());
	echo("\nATTRIBUTES");
	MBeanAttributeInfo[] attrInfo = info.getAttributes();
	if (attrInfo.length>0) {
	    for(int i=0; i<attrInfo.length; i++) {
		echo(" ** NAME: \t"+ attrInfo[i].getName());
		echo("    DESCR: \t"+ attrInfo[i].getDescription());
		echo("    TYPE: \t"+ attrInfo[i].getType() +
		     "\tREAD: "+ attrInfo[i].isReadable() +
		     "\tWRITE: "+ attrInfo[i].isWritable());
	    }
	} else echo(" ** No attributes **");
	echo("\nCONSTRUCTORS");
	MBeanConstructorInfo[] constrInfo = info.getConstructors();
	for(int i=0; i<constrInfo.length; i++) {
	    echo(" ** NAME: \t"+ constrInfo[i].getName());
	    echo("    DESCR: \t"+ constrInfo[i].getDescription());
	    echo("    PARAM: \t"+ constrInfo[i].getSignature().length +" parameter(s)");
	}
	echo("\nOPERATIONS");
	MBeanOperationInfo[] opInfo = info.getOperations();
	if (opInfo.length>0) {
	    for(int i=0; i<opInfo.length; i++) {
		echo(" ** NAME: \t"+ opInfo[i].getName());
		echo("    DESCR: \t"+ opInfo[i].getDescription());
		echo("    PARAM: \t"+ opInfo[i].getSignature().length +" parameter(s)");
	    }
	} else echo(" ** No operations ** ");
	echo("\nNOTIFICATIONS");
	MBeanNotificationInfo[] notifInfo = info.getNotifications();
	if (notifInfo.length>0) {
	    for(int i=0; i<notifInfo.length; i++) {
		echo(" ** NAME: \t"+ notifInfo[i].getName());
		echo("    DESCR: \t"+ notifInfo[i].getDescription());
	    }
	} else echo(" ** No notifications **");
    }
 
源代码18 项目: cacheonix-core   文件: ModelAgent.java
public void printLocalMBeanInfo(MBeanInfo info)
{
	echo("\nCLASSNAME: \t"+ info.getClassName());
	echo("\nDESCRIPTION: \t"+ info.getDescription());
	echo("\nATTRIBUTES");
	MBeanAttributeInfo[] attrInfo = info.getAttributes();
	if (attrInfo.length>0)
	{
		for (int i=0; i<attrInfo.length; i++)
		{
			echo(" ** NAME: \t"+ attrInfo[i].getName());
			echo("    DESCR: \t"+ attrInfo[i].getDescription());
			echo("    TYPE: \t"+ attrInfo[i].getType() +
				 "\tREAD: "+ attrInfo[i].isReadable() +
				 "\tWRITE: "+ attrInfo[i].isWritable());
			echo("    DESCRIPTOR: \t" + (((ModelMBeanAttributeInfo)attrInfo[i]).getDescriptor()).toString());
		}
	} else echo(" ** No attributes **");
	echo("\nCONSTRUCTORS");
	MBeanConstructorInfo[] constrInfo = info.getConstructors();
	for (int i=0; i<constrInfo.length; i++)
	{
		echo(" ** NAME: \t"+ constrInfo[i].getName());
		echo("    DESCR: \t"+ constrInfo[i].getDescription());
		echo("    PARAM: \t"+ constrInfo[i].getSignature().length +" parameter(s)");
		echo("    DESCRIPTOR: \t" + (((ModelMBeanConstructorInfo)constrInfo[i]).getDescriptor()).toString());
	}
	echo("\nOPERATIONS");
	MBeanOperationInfo[] opInfo = info.getOperations();
	if (opInfo.length>0)
	{
		for (int i=0; i<opInfo.length; i++)
		{
			echo(" ** NAME: \t"+ opInfo[i].getName());
			echo("    DESCR: \t"+ opInfo[i].getDescription());
			echo("    PARAM: \t"+ opInfo[i].getSignature().length +" parameter(s)");
			echo("    DESCRIPTOR: \t" + (((ModelMBeanOperationInfo)opInfo[i]).getDescriptor()).toString());
		}
	} else echo(" ** No operations ** ");
	echo("\nNOTIFICATIONS");
	MBeanNotificationInfo[] notifInfo = info.getNotifications();
	if (notifInfo.length>0)
	{
		for (int i=0; i<notifInfo.length; i++)
		{
			echo(" ** NAME: \t"+ notifInfo[i].getName());
			echo("    DESCR: \t"+ notifInfo[i].getDescription());
			echo("    DESCRIPTOR: \t" + (((ModelMBeanNotificationInfo) notifInfo[i]).getDescriptor()).toString());
		}
	} else echo(" ** No notifications **");

}
 
源代码19 项目: cacheonix-core   文件: RelationAgent.java
private void printMBeanInfo(ObjectName mbeanObjectName, String mbeanName) {

	echo("\n>>> GETTING THE MANAGEMENT INFORMATION for the "+ mbeanName +" MBean");
	echo("\tusing the getMBeanInfo method of the MBeanServer");
	sleep(1000);
	MBeanInfo info = null;
	try {
	    info = server.getMBeanInfo(mbeanObjectName);
	} catch (Exception e) {
	    echo("\t!!! Could not get MBeanInfo object for "+ mbeanName +" !!!");
	    printException(e);
	}
	echo("\nCLASSNAME: \t"+ info.getClassName());
	echo("\nDESCRIPTION: \t"+ info.getDescription());
	echo("\nATTRIBUTES");
	MBeanAttributeInfo[] attrInfo = info.getAttributes();
	if (attrInfo.length>0) {
	    for(int i=0; i< attrInfo.length; i++) {
		echo(" ** NAME: \t"+ attrInfo[i].getName());
		echo("    DESCR: \t"+ attrInfo[i].getDescription());
		echo("    TYPE: \t"+ attrInfo[i].getType() +
		     "\tREAD: "+ attrInfo[i].isReadable() +
		     "\tWRITE: "+ attrInfo[i].isWritable());
	    }
	} else echo(" ** No attributes **");
	echo("\nCONSTRUCTORS");
	MBeanConstructorInfo[] constrInfo = info.getConstructors();
	for(int i=0; i< constrInfo.length; i++) {
	    echo(" ** NAME: \t"+ constrInfo[i].getName());
	    echo("    DESCR: \t"+ constrInfo[i].getDescription());
	    echo("    PARAM: \t"+ constrInfo[i].getSignature().length +" parameter(s)");
	}
	echo("\nOPERATIONS");
	MBeanOperationInfo[] opInfo = info.getOperations();
	if (opInfo.length>0) {
	    for(int i=0; i< opInfo.length; i++) {
		echo(" ** NAME: \t"+ opInfo[i].getName());
		echo("    DESCR: \t"+ opInfo[i].getDescription());
		echo("    PARAM: \t"+ opInfo[i].getSignature().length +" parameter(s)");
	    }
	} else echo(" ** No operations ** ");
	echo("\nNOTIFICATIONS");
	MBeanNotificationInfo[] notifInfo = info.getNotifications();
	if (notifInfo.length>0) {
	    for(int i=0; i< notifInfo.length; i++) {
		echo(" ** NAME: \t"+ notifInfo[i].getName());
		echo("    DESCR: \t"+ notifInfo[i].getDescription());
	    }
	} else echo(" ** No notifications **");
    }