⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jmxmbeanserver.java

📁 Mobile 应用程序使用 Java Micro Edition (Java ME) 平台
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
        return mbsInterceptor.isRegistered(name);    }     /**     * Returns the number of MBeans registered in the MBean server.     */    public Integer getMBeanCount()  {         return mbsInterceptor.getMBeanCount();    }     /**     * Gets the value of a specific attribute of a named MBean. The MBean     * is identified by its object name.     *     * @param name The object name of the MBean from which the attribute     *     is to be retrieved.     * @param attribute A String specifying the name of the attribute to be     *     retrieved.     *     * @return  The value of the retrieved attribute.     *     * @exception AttributeNotFoundException The attribute specified     *     is not accessible in the MBean.     * @exception MBeanException  Wraps an exception thrown by the      *     MBean's getter.     * @exception InstanceNotFoundException The MBean specified is not     *     registered in the MBean server.     * @exception ReflectionException  Wraps an      *     <CODE>{@link java.lang.Exception}</CODE> thrown when trying to      *     invoke the setter.      * @exception RuntimeOperationsException Wraps an      *     <CODE>{@link java.lang.IllegalArgumentException}</CODE>:      *     The object name in parameter is null or the attribute in      *     parameter is null.     */    public Object getAttribute(ObjectName name, String attribute) 	throws MBeanException, AttributeNotFoundException, 	       InstanceNotFoundException, ReflectionException { 	return mbsInterceptor.getAttribute(cloneObjectName(name), attribute);    }     /**     * Enables the values of several attributes of a named MBean. The MBean     * is identified by its object name.     *     * @param name The object name of the MBean from which the attributes are     *     retrieved.     * @param attributes A list of the attributes to be retrieved.     *     * @return The list of the retrieved attributes.     *     * @exception InstanceNotFoundException The MBean specified is not      *     registered in the MBean server.     * @exception ReflectionException An exception occurred when trying      *     to invoke the getAttributes method of a Dynamic MBean.     * @exception RuntimeOperationsException Wrap an      *     <CODE>{@link java.lang.IllegalArgumentException}</CODE>: The      *     object name in parameter is null or attributes in parameter      *     is null.     *     */    public AttributeList getAttributes(ObjectName name, String[] attributes)        throws InstanceNotFoundException, ReflectionException  {   	return mbsInterceptor.getAttributes(cloneObjectName(name), attributes);       }     /**     * Sets the value of a specific attribute of a named MBean. The MBean     * is identified by its object name.     *     * @param name The name of the MBean within which the attribute is      *     to be set.     * @param attribute The identification of the attribute to be set      *     and the value it is to be set to.     *     * @exception InstanceNotFoundException The MBean specified is      *     not registered in the MBean server.     * @exception AttributeNotFoundException The attribute specified is      *     not accessible in the MBean.     * @exception InvalidAttributeValueException The value specified for      *     the attribute is not valid.     * @exception MBeanException Wraps an exception thrown by the      *     MBean's setter.     * @exception ReflectionException  Wraps an      *     <CODE>{@link java.lang.Exception}</CODE> thrown when trying      *     to invoke the setter.      * @exception RuntimeOperationsException Wraps an      *     <CODE>{@link java.lang.IllegalArgumentException}</CODE>: The      *     object name in parameter is null or the attribute in parameter     *     is null.     */    public void setAttribute(ObjectName name, Attribute attribute) 	throws InstanceNotFoundException, AttributeNotFoundException, 	       InvalidAttributeValueException, MBeanException, 	       ReflectionException  { 		mbsInterceptor.setAttribute(cloneObjectName(name),				    cloneAttribute(attribute));    }    /**     * Sets the values of several attributes of a named MBean. The MBean is     * identified by its object name.     *     * @param name The object name of the MBean within which the      *     attributes are to  be set.     * @param attributes A list of attributes: The identification of the     *     attributes to be set and  the values they are to be set to.     *     * @return  The list of attributes that were set, with their new values.     *     * @exception InstanceNotFoundException The MBean specified is not     *      registered in the MBean server.     * @exception ReflectionException An exception occurred when trying      *      to invoke the getAttributes method of a Dynamic MBean.     * @exception RuntimeOperationsException Wraps an      *      <CODE>{@link java.lang.IllegalArgumentException}</CODE>:      *     The object name in parameter is null or  attributes in      *     parameter is null.     *     */    public AttributeList setAttributes(ObjectName name, 				       AttributeList attributes)        throws InstanceNotFoundException, ReflectionException  { 		return mbsInterceptor.setAttributes(cloneObjectName(name),					    cloneAttributeList(attributes));    }    /**     * Invokes an operation on an MBean.     *     * @param name The object name of the MBean on which the method is to be      *     invoked.     * @param operationName The name of the operation to be invoked.     * @param params An array containing the parameters to be set when      *     the operation is invoked     * @param signature An array containing the signature of the operation.      *     The class objects will be loaded using the same class loader as      *     the one used for loading the MBean on which the operation was      *     invoked.     *     * @return  The object returned by the operation, which represents the      *      result ofinvoking the operation on the  MBean specified.     *     * @exception InstanceNotFoundException The MBean specified is not      *       registered in the MBean server.     * @exception MBeanException  Wraps an exception thrown by the MBean's      *       invoked method.     * @exception ReflectionException  Wraps an      *       <CODE>{@link java.lang.Exception}</CODE> thrown while trying     *        to invoke the method.     *     */    public Object invoke(ObjectName name, String operationName, 			 Object params[], String signature[]) 	throws InstanceNotFoundException, MBeanException, 	       ReflectionException {         return mbsInterceptor.invoke(cloneObjectName(name), operationName,				     params, signature);    }     /**     * Returns the default domain used for naming the MBean.     * The default domain name is used as the domain part in the ObjectName     * of MBeans if no domain is specified by the user.     */    public String getDefaultDomain()  {         return mbsInterceptor.getDefaultDomain();    }         // From MBeanServer    public String[] getDomains() {        return mbsInterceptor.getDomains();    }     /**     * Adds a listener to a registered MBean.     *     * @param name The name of the MBean on which the listener should be added.     * @param listener The listener object which will handle the      *        notifications emitted by the registered MBean.     * @param filter The filter object. If filter is null, no filtering      *        will be performed before handling notifications.     * @param handback The context to be sent to the listener when a      *        notification is emitted.     *     * @exception InstanceNotFoundException The MBean name provided does      *       not match any of the registered MBeans.     */    public void addNotificationListener(ObjectName name, 					NotificationListener listener, 					NotificationFilter filter, 					Object handback)        throws InstanceNotFoundException {	mbsInterceptor.addNotificationListener(cloneObjectName(name), listener,					       filter, handback);    }    /**     * Adds a listener to a registered MBean.     *     * @param name The name of the MBean on which the listener should be added.     * @param listener The object name of the listener which will handle the      *        notifications emitted by the registered MBean.     * @param filter The filter object. If filter is null, no filtering will     *        be performed before handling notifications.     * @param handback The context to be sent to the listener when a      *        notification is emitted.     *     * @exception InstanceNotFoundException The MBean name of the      *       notification listener or of the notification broadcaster     *       does not match any of the registered MBeans.     */    public void addNotificationListener(ObjectName name, ObjectName listener, 				   NotificationFilter filter, Object handback)        throws InstanceNotFoundException {	        mbsInterceptor.addNotificationListener(cloneObjectName(name), listener,					       filter, handback);    }    public void removeNotificationListener(ObjectName name,					   NotificationListener listener)	    throws InstanceNotFoundException, ListenerNotFoundException {		mbsInterceptor.removeNotificationListener(cloneObjectName(name),						  listener);    }    public void removeNotificationListener(ObjectName name,					   NotificationListener listener,					   NotificationFilter filter,					   Object handback)	    throws InstanceNotFoundException, ListenerNotFoundException {		mbsInterceptor.removeNotificationListener(cloneObjectName(name),						  listener, filter, handback);    }    public void removeNotificationListener(ObjectName name,					   ObjectName listener)         throws InstanceNotFoundException, ListenerNotFoundException {	mbsInterceptor.removeNotificationListener(cloneObjectName(name),						  listener);    }    public void removeNotificationListener(ObjectName name,					   ObjectName listener,					   NotificationFilter filter,					   Object handback) 	    throws InstanceNotFoundException, ListenerNotFoundException {	mbsInterceptor.removeNotificationListener(cloneObjectName(name),						  listener, filter, handback);    }    /**     * This method discovers the attributes and operations that an MBean exposes     * for management.     *     * @param name The name of the MBean to analyze     *     * @return  An instance of <CODE>MBeanInfo</CODE> allowing the retrieval of     * all attributes and operations of this MBean.     *     * @exception IntrospectionException An exception occurs during     * introspection.     * @exception InstanceNotFoundException The MBean specified is not found.     * @exception ReflectionException An exception occurred when trying to     * invoke the getMBeanInfo of a Dynamic MBean.     */    public MBeanInfo getMBeanInfo(ObjectName name) throws    InstanceNotFoundException, IntrospectionException, ReflectionException { 		return mbsInterceptor.getMBeanInfo(cloneObjectName(name));    }    /**     * Instantiates an object using the list of all class loaders registered     * in the MBean server (using its      * {@link javax.management.loading.ClassLoaderRepository Default Loader Repository}).     * The object's class should have a public constructor.     * It returns a reference to the newly created object.     * The newly created object is not registered in the MBean server.     *     * @param className The class name of the object to be instantiated.         *     * @return The newly instantiated object.         *

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -