2362N/A * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * <p>RMI object used to forward an MBeanServer request from a client 0N/A * to its MBeanServer implementation on the server side. There is one 0N/A * Remote object implementing this interface for each remote client 0N/A * connected to an RMI connector.</p> 0N/A * <p>User code does not usually refer to this interface. It is 0N/A * specified as part of the public API so that different 0N/A * implementations of that API will interoperate.</p> 0N/A * <p>To ensure that client parameters will be deserialized at the 0N/A * server side with the correct classloader, client parameters such as 0N/A * parameters used to invoke a method are wrapped in a {@link 0N/A * MarshalledObject}. An implementation of this interface must first 0N/A * get the appropriate class loader for the operation and its target, 0N/A * then deserialize the marshalled parameters with this classloader. 0N/A * Except as noted, a parameter that is a 0N/A * <code>MarshalledObject</code> or <code>MarshalledObject[]</code> 0N/A * must not be null; the behavior is unspecified if it is.</p> 0N/A * <p>Class loading aspects are detailed in the 0N/A * JMX Specification, version 1.4</a> PDF document.</p> 0N/A * <p>Most methods in this interface parallel methods in the {@link 0N/A * MBeanServerConnection} interface. Where an aspect of the behavior 0N/A * of a method is not specified here, it is the same as in the 0N/A * corresponding <code>MBeanServerConnection</code> method. 0N/A * Notice that we omit the type parameter from MarshalledObject everywhere, 0N/A * even though it would add useful information to the documentation. The 0N/A * reason is that it was only added in Mustang (Java SE 6), whereas versions 0N/A * 1.4 and 2.0 of the JMX API must be implementable on Tiger per our 686N/A * commitments for JSR 255. This is also why we suppress rawtypes warnings. 0N/A * <p>Returns the connection ID. This string is different for 0N/A * every open connection to a given RMI connector server.</p> 0N/A * @return the connection ID 0N/A * @see RMIConnector#connect RMIConnector.connect 0N/A * @throws IOException if a general communication exception occurred. 0N/A * <p>Closes this connection. On return from this method, the RMI 0N/A * object implementing this interface is unexported, so further 0N/A * remote calls to it will fail.</p> 0N/A * @throws IOException if the connection could not be closed, 0N/A * or the Remote object could not be unexported, or there was a 0N/A * communication failure when transmitting the remote close 0N/A * Handles the method {@link 0N/A * javax.management.MBeanServerConnection#createMBean(String, 0N/A * @param className The class name of the MBean to be instantiated. 0N/A * @param name The object name of the MBean. May be null. 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @return An <code>ObjectInstance</code>, containing the 0N/A * <code>ObjectName</code> and the Java class name of the newly 0N/A * instantiated MBean. If the contained <code>ObjectName</code> 0N/A * is <code>n</code>, the contained Java class name is 0N/A * <code>{@link #getMBeanInfo getMBeanInfo(n)}.getClassName()</code>. 0N/A * @throws ReflectionException Wraps a 0N/A * <code>java.lang.ClassNotFoundException</code> or a 0N/A * <code>java.lang.Exception</code> that occurred 0N/A * when trying to invoke the MBean's constructor. 0N/A * @throws InstanceAlreadyExistsException The MBean is already 0N/A * under the control of the MBean server. 0N/A * @throws MBeanRegistrationException The 0N/A * <code>preRegister</code> (<code>MBeanRegistration</code> 0N/A * interface) method of the MBean has thrown an exception. The 0N/A * MBean will not be registered. 0N/A * @throws MBeanException The constructor of the MBean has 0N/A * thrown an exception. 0N/A * @throws NotCompliantMBeanException This class is not a JMX 0N/A * @throws RuntimeOperationsException Wraps a 0N/A * <code>java.lang.IllegalArgumentException</code>: The className 0N/A * passed in parameter is null, the <code>ObjectName</code> passed 0N/A * in parameter contains a pattern or no <code>ObjectName</code> 0N/A * is specified for the MBean. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * Handles the method {@link 0N/A * javax.management.MBeanServerConnection#createMBean(String, 0N/A * ObjectName, ObjectName)}. 0N/A * @param className The class name of the MBean to be instantiated. 0N/A * @param name The object name of the MBean. May be null. 0N/A * @param loaderName The object name of the class loader to be used. 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @return An <code>ObjectInstance</code>, containing the 0N/A * <code>ObjectName</code> and the Java class name of the newly 0N/A * instantiated MBean. If the contained <code>ObjectName</code> 0N/A * is <code>n</code>, the contained Java class name is 0N/A * <code>{@link #getMBeanInfo getMBeanInfo(n)}.getClassName()</code>. 0N/A * @throws ReflectionException Wraps a 0N/A * <code>java.lang.ClassNotFoundException</code> or a 0N/A * <code>java.lang.Exception</code> that occurred when trying to 0N/A * invoke the MBean's constructor. 0N/A * @throws InstanceAlreadyExistsException The MBean is already 0N/A * under the control of the MBean server. 0N/A * @throws MBeanRegistrationException The 0N/A * <code>preRegister</code> (<code>MBeanRegistration</code> 0N/A * interface) method of the MBean has thrown an exception. The 0N/A * MBean will not be registered. 0N/A * @throws MBeanException The constructor of the MBean has 0N/A * thrown an exception. 0N/A * @throws NotCompliantMBeanException This class is not a JMX 0N/A * @throws InstanceNotFoundException The specified class loader 0N/A * is not registered in the MBean server. 0N/A * @throws RuntimeOperationsException Wraps a 0N/A * <code>java.lang.IllegalArgumentException</code>: The className 0N/A * passed in parameter is null, the <code>ObjectName</code> passed 0N/A * in parameter contains a pattern or no <code>ObjectName</code> 0N/A * is specified for the MBean. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * Handles the method {@link 0N/A * javax.management.MBeanServerConnection#createMBean(String, 0N/A * ObjectName, Object[], String[])}. The <code>Object[]</code> 0N/A * parameter is wrapped in a <code>MarshalledObject</code>. 0N/A * @param className The class name of the MBean to be instantiated. 0N/A * @param name The object name of the MBean. May be null. 0N/A * @param params An array containing the parameters of the 0N/A * constructor to be invoked, encapsulated into a 0N/A * <code>MarshalledObject</code>. The encapsulated array can be 0N/A * null, equivalent to an empty array. 0N/A * @param signature An array containing the signature of the 0N/A * constructor to be invoked. Can be null, equivalent to an empty 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @return An <code>ObjectInstance</code>, containing the 0N/A * <code>ObjectName</code> and the Java class name of the newly 0N/A * instantiated MBean. If the contained <code>ObjectName</code> 0N/A * is <code>n</code>, the contained Java class name is 0N/A * <code>{@link #getMBeanInfo getMBeanInfo(n)}.getClassName()</code>. 0N/A * @throws ReflectionException Wraps a 0N/A * <code>java.lang.ClassNotFoundException</code> or a 0N/A * <code>java.lang.Exception</code> that occurred when trying to 0N/A * invoke the MBean's constructor. 0N/A * @throws InstanceAlreadyExistsException The MBean is already 0N/A * under the control of the MBean server. 0N/A * @throws MBeanRegistrationException The 0N/A * <code>preRegister</code> (<code>MBeanRegistration</code> 0N/A * interface) method of the MBean has thrown an exception. The 0N/A * MBean will not be registered. 0N/A * @throws MBeanException The constructor of the MBean has 0N/A * thrown an exception. 0N/A * @throws NotCompliantMBeanException This class is not a JMX 0N/A * @throws RuntimeOperationsException Wraps a 0N/A * <code>java.lang.IllegalArgumentException</code>: The className 0N/A * passed in parameter is null, the <code>ObjectName</code> passed 0N/A * in parameter contains a pattern, or no <code>ObjectName</code> 0N/A * is specified for the MBean. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * Handles the method {@link 0N/A * javax.management.MBeanServerConnection#createMBean(String, 0N/A * ObjectName, ObjectName, Object[], String[])}. The 0N/A * <code>Object[]</code> parameter is wrapped in a 0N/A * <code>MarshalledObject</code>. 0N/A * @param className The class name of the MBean to be instantiated. 0N/A * @param name The object name of the MBean. May be null. 0N/A * @param loaderName The object name of the class loader to be used. 0N/A * @param params An array containing the parameters of the 0N/A * constructor to be invoked, encapsulated into a 0N/A * <code>MarshalledObject</code>. The encapsulated array can be 0N/A * null, equivalent to an empty array. 0N/A * @param signature An array containing the signature of the 0N/A * constructor to be invoked. Can be null, equivalent to an empty 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @return An <code>ObjectInstance</code>, containing the 0N/A * <code>ObjectName</code> and the Java class name of the newly 0N/A * instantiated MBean. If the contained <code>ObjectName</code> 0N/A * is <code>n</code>, the contained Java class name is 0N/A * <code>{@link #getMBeanInfo getMBeanInfo(n)}.getClassName()</code>. 0N/A * @throws ReflectionException Wraps a 0N/A * <code>java.lang.ClassNotFoundException</code> or a 0N/A * <code>java.lang.Exception</code> that occurred when trying to 0N/A * invoke the MBean's constructor. 0N/A * @throws InstanceAlreadyExistsException The MBean is already 0N/A * under the control of the MBean server. 0N/A * @throws MBeanRegistrationException The 0N/A * <code>preRegister</code> (<code>MBeanRegistration</code> 0N/A * interface) method of the MBean has thrown an exception. The 0N/A * MBean will not be registered. 0N/A * @throws MBeanException The constructor of the MBean has 0N/A * thrown an exception. 0N/A * @throws NotCompliantMBeanException This class is not a JMX 0N/A * @throws InstanceNotFoundException The specified class loader 0N/A * is not registered in the MBean server. 0N/A * @throws RuntimeOperationsException Wraps a 0N/A * <code>java.lang.IllegalArgumentException</code>: The className 0N/A * passed in parameter is null, the <code>ObjectName</code> passed 0N/A * in parameter contains a pattern, or no <code>ObjectName</code> 0N/A * is specified for the MBean. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * Handles the method 0N/A * {@link javax.management.MBeanServerConnection#unregisterMBean(ObjectName)}. 0N/A * @param name The object name of the MBean to be unregistered. 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @throws InstanceNotFoundException The MBean specified is not 0N/A * registered in the MBean server. 0N/A * @throws MBeanRegistrationException The preDeregister 0N/A * ((<code>MBeanRegistration</code> interface) method of the MBean 0N/A * has thrown an exception. 0N/A * @throws RuntimeOperationsException Wraps a 0N/A * <code>java.lang.IllegalArgumentException</code>: The object 0N/A * name in parameter is null or the MBean you are when trying to 0N/A * unregister is the {@link javax.management.MBeanServerDelegate 0N/A * MBeanServerDelegate} MBean. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * Handles the method 0N/A * {@link javax.management.MBeanServerConnection#getObjectInstance(ObjectName)}. 0N/A * @param name The object name of the MBean. 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @return The <code>ObjectInstance</code> associated with the MBean 0N/A * specified by <var>name</var>. The contained <code>ObjectName</code> 0N/A * is <code>name</code> and the contained class name is 0N/A * <code>{@link #getMBeanInfo getMBeanInfo(name)}.getClassName()</code>. 0N/A * @throws InstanceNotFoundException The MBean specified is not 0N/A * registered in the MBean server. 0N/A * @throws RuntimeOperationsException Wraps a 0N/A * <code>java.lang.IllegalArgumentException</code>: The object 0N/A * name in parameter is null. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * Handles the method {@link 0N/A * javax.management.MBeanServerConnection#queryMBeans(ObjectName, 0N/A * QueryExp)}. The <code>QueryExp</code> is wrapped in a 0N/A * <code>MarshalledObject</code>. 0N/A * @param name The object name pattern identifying the MBeans to 0N/A * be retrieved. If null or no domain and key properties are 0N/A * specified, all the MBeans registered will be retrieved. 0N/A * @param query The query expression to be applied for selecting 0N/A * MBeans, encapsulated into a <code>MarshalledObject</code>. If 0N/A * the <code>MarshalledObject</code> encapsulates a null value no 0N/A * query expression will be applied for selecting MBeans. 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @return A set containing the <code>ObjectInstance</code> 0N/A * objects for the selected MBeans. If no MBean satisfies the 0N/A * query an empty list is returned. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * Handles the method {@link 0N/A * javax.management.MBeanServerConnection#queryNames(ObjectName, 0N/A * QueryExp)}. The <code>QueryExp</code> is wrapped in a 0N/A * <code>MarshalledObject</code>. 0N/A * @param name The object name pattern identifying the MBean names 0N/A * to be retrieved. If null or no domain and key properties are 0N/A * specified, the name of all registered MBeans will be retrieved. 0N/A * @param query The query expression to be applied for selecting 0N/A * MBeans, encapsulated into a <code>MarshalledObject</code>. If 0N/A * the <code>MarshalledObject</code> encapsulates a null value no 0N/A * query expression will be applied for selecting MBeans. 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @return A set containing the ObjectNames for the MBeans 0N/A * selected. If no MBean satisfies the query, an empty list is 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * Handles the method 0N/A * {@link javax.management.MBeanServerConnection#isRegistered(ObjectName)}. 0N/A * @param name The object name of the MBean to be checked. 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @return True if the MBean is already registered in the MBean 0N/A * server, false otherwise. 0N/A * @throws RuntimeOperationsException Wraps a 0N/A * <code>java.lang.IllegalArgumentException</code>: The object 0N/A * name in parameter is null. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * Handles the method 0N/A * {@link javax.management.MBeanServerConnection#getMBeanCount()}. 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @return the number of MBeans registered. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * Handles the method {@link 0N/A * javax.management.MBeanServerConnection#getAttribute(ObjectName, 0N/A * @param name The object name of the MBean from which the 0N/A * attribute is to be retrieved. 0N/A * @param attribute A String specifying the name of the attribute 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @return The value of the retrieved attribute. 0N/A * @throws AttributeNotFoundException The attribute specified 0N/A * is not accessible in the MBean. 0N/A * @throws MBeanException Wraps an exception thrown by the 0N/A * @throws InstanceNotFoundException The MBean specified is not 0N/A * registered in the MBean server. 0N/A * @throws ReflectionException Wraps a 0N/A * <code>java.lang.Exception</code> thrown when trying to invoke 0N/A * @throws RuntimeOperationsException Wraps a 0N/A * <code>java.lang.IllegalArgumentException</code>: The object 0N/A * name in parameter is null or the attribute in parameter is 0N/A * @throws RuntimeMBeanException Wraps a runtime exception thrown 0N/A * by the MBean's getter. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * @see #setAttribute 0N/A * Handles the method {@link 0N/A * javax.management.MBeanServerConnection#getAttributes(ObjectName, 0N/A * @param name The object name of the MBean from which the 0N/A * attributes are retrieved. 0N/A * @param attributes A list of the attributes to be retrieved. 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @return The list of the retrieved attributes. 0N/A * @throws InstanceNotFoundException The MBean specified is not 0N/A * registered in the MBean server. 0N/A * @throws ReflectionException An exception occurred when 0N/A * trying to invoke the getAttributes method of a Dynamic MBean. 0N/A * @throws RuntimeOperationsException Wrap a 0N/A * <code>java.lang.IllegalArgumentException</code>: The object 0N/A * name in parameter is null or attributes in parameter is null. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * @see #setAttributes 0N/A * Handles the method {@link 0N/A * javax.management.MBeanServerConnection#setAttribute(ObjectName, 0N/A * Attribute)}. The <code>Attribute</code> parameter is wrapped 0N/A * in a <code>MarshalledObject</code>. 0N/A * @param name The name of the MBean within which the attribute is 0N/A * @param attribute The identification of the attribute to be set 0N/A * and the value it is to be set to, encapsulated into a 0N/A * <code>MarshalledObject</code>. 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @throws InstanceNotFoundException The MBean specified is not 0N/A * registered in the MBean server. 0N/A * @throws AttributeNotFoundException The attribute specified 0N/A * is not accessible in the MBean. 0N/A * @throws InvalidAttributeValueException The value specified 0N/A * for the attribute is not valid. 0N/A * @throws MBeanException Wraps an exception thrown by the 0N/A * @throws ReflectionException Wraps a 0N/A * <code>java.lang.Exception</code> thrown when trying to invoke 0N/A * @throws RuntimeOperationsException Wraps a 0N/A * <code>java.lang.IllegalArgumentException</code>: The object 0N/A * name in parameter is null or the attribute in parameter is 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * @see #getAttribute 0N/A * Handles the method {@link 0N/A * javax.management.MBeanServerConnection#setAttributes(ObjectName, 0N/A * AttributeList)}. The <code>AttributeList</code> parameter is 0N/A * wrapped in a <code>MarshalledObject</code>. 0N/A * @param name The object name of the MBean within which the 0N/A * attributes are to be set. 0N/A * @param attributes A list of attributes: The identification of 0N/A * the attributes to be set and the values they are to be set to, 0N/A * encapsulated into a <code>MarshalledObject</code>. 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @return The list of attributes that were set, with their new 0N/A * @throws InstanceNotFoundException The MBean specified is not 0N/A * registered in the MBean server. 0N/A * @throws ReflectionException An exception occurred when 0N/A * trying to invoke the getAttributes method of a Dynamic MBean. 0N/A * @throws RuntimeOperationsException Wraps a 0N/A * <code>java.lang.IllegalArgumentException</code>: The object 0N/A * name in parameter is null or attributes in parameter is null. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * @see #getAttributes 0N/A * Handles the method {@link 0N/A * javax.management.MBeanServerConnection#invoke(ObjectName, 0N/A * String, Object[], String[])}. The <code>Object[]</code> 0N/A * parameter is wrapped in a <code>MarshalledObject</code>. 0N/A * @param name The object name of the MBean on which the method is 0N/A * @param operationName The name of the operation to be invoked. 0N/A * @param params An array containing the parameters to be set when 0N/A * the operation is invoked, encapsulated into a 0N/A * <code>MarshalledObject</code>. The encapsulated array can be 0N/A * null, equivalent to an empty array. 0N/A * @param signature An array containing the signature of the 0N/A * operation. The class objects will be loaded using the same 0N/A * class loader as the one used for loading the MBean on which the 0N/A * operation was invoked. Can be null, equivalent to an empty 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @return The object returned by the operation, which represents 0N/A * the result of invoking the operation on the MBean specified. 0N/A * @throws InstanceNotFoundException The MBean specified is not 0N/A * registered in the MBean server. 0N/A * @throws MBeanException Wraps an exception thrown by the 0N/A * MBean's invoked method. 0N/A * @throws ReflectionException Wraps a 0N/A * <code>java.lang.Exception</code> thrown while trying to invoke 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * @throws RuntimeOperationsException Wraps an {@link 0N/A * IllegalArgumentException} when <code>name</code> or 0N/A * <code>operationName</code> is null. 0N/A * Handles the method 0N/A * {@link javax.management.MBeanServerConnection#getDefaultDomain()}. 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @return the default domain. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * Handles the method 0N/A * {@link javax.management.MBeanServerConnection#getDomains()}. 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @return the list of domains. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * Handles the method 0N/A * {@link javax.management.MBeanServerConnection#getMBeanInfo(ObjectName)}. 0N/A * @param name The name of the MBean to analyze 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @return An instance of <code>MBeanInfo</code> allowing the 0N/A * retrieval of all attributes and operations of this MBean. 0N/A * @throws IntrospectionException An exception occurred during 0N/A * @throws InstanceNotFoundException The MBean specified was 0N/A * @throws ReflectionException An exception occurred when 0N/A * trying to invoke the getMBeanInfo of a Dynamic MBean. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * @throws RuntimeOperationsException Wraps a 0N/A * <code>java.lang.IllegalArgumentException</code>: The object 0N/A * name in parameter is null. 0N/A * Handles the method {@link 0N/A * javax.management.MBeanServerConnection#isInstanceOf(ObjectName, 0N/A * @param name The <code>ObjectName</code> of the MBean. 0N/A * @param className The name of the class. 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @return true if the MBean specified is an instance of the 0N/A * specified class according to the rules above, false otherwise. 0N/A * @throws InstanceNotFoundException The MBean specified is not 0N/A * registered in the MBean server. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * @throws RuntimeOperationsException Wraps a 0N/A * <code>java.lang.IllegalArgumentException</code>: The object 0N/A * name in parameter is null. 0N/A * Handles the method {@link 0N/A * javax.management.MBeanServerConnection#addNotificationListener(ObjectName, 0N/A * ObjectName, NotificationFilter, Object)}. The 0N/A * <code>NotificationFilter</code> parameter is wrapped in a 0N/A * <code>MarshalledObject</code>. The <code>Object</code> 0N/A * (handback) parameter is also wrapped in a 0N/A * <code>MarshalledObject</code>. 0N/A * @param name The name of the MBean on which the listener should 0N/A * @param listener The object name of the listener which will 0N/A * handle the notifications emitted by the registered MBean. 0N/A * @param filter The filter object, encapsulated into a 0N/A * <code>MarshalledObject</code>. If filter encapsulated in the 0N/A * <code>MarshalledObject</code> has a null value, no filtering 0N/A * will be performed before handling notifications. 0N/A * @param handback The context to be sent to the listener when a 0N/A * notification is emitted, encapsulated into a 0N/A * <code>MarshalledObject</code>. 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @throws InstanceNotFoundException The MBean name of the 0N/A * notification listener or of the notification broadcaster does 0N/A * not match any of the registered MBeans. 0N/A * @throws RuntimeOperationsException Wraps an {@link 0N/A * IllegalArgumentException}. The MBean named by 0N/A * <code>listener</code> exists but does not implement the 0N/A * {@link javax.management.NotificationListener} interface, 0N/A * or <code>name</code> or <code>listener</code> is null. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * @see #removeNotificationListener(ObjectName, ObjectName, Subject) 0N/A * @see #removeNotificationListener(ObjectName, ObjectName, 0N/A * MarshalledObject, MarshalledObject, Subject) 0N/A * Handles the method {@link 0N/A * javax.management.MBeanServerConnection#removeNotificationListener(ObjectName, 0N/A * @param name The name of the MBean on which the listener should 0N/A * @param listener The object name of the listener to be removed. 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @throws InstanceNotFoundException The MBean name provided 0N/A * does not match any of the registered MBeans. 0N/A * @throws ListenerNotFoundException The listener is not 0N/A * registered in the MBean. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * @throws RuntimeOperationsException Wraps an {@link 0N/A * IllegalArgumentException} when <code>name</code> or 0N/A * <code>listener</code> is null. 0N/A * @see #addNotificationListener 0N/A * Handles the method {@link 0N/A * javax.management.MBeanServerConnection#removeNotificationListener(ObjectName, 0N/A * ObjectName, NotificationFilter, Object)}. The 0N/A * <code>NotificationFilter</code> parameter is wrapped in a 0N/A * <code>MarshalledObject</code>. The <code>Object</code> 0N/A * parameter is also wrapped in a <code>MarshalledObject</code>. 0N/A * @param name The name of the MBean on which the listener should 0N/A * @param listener A listener that was previously added to this 0N/A * @param filter The filter that was specified when the listener 0N/A * was added, encapsulated into a <code>MarshalledObject</code>. 0N/A * @param handback The handback that was specified when the 0N/A * listener was added, encapsulated into a <code>MarshalledObject</code>. 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @throws InstanceNotFoundException The MBean name provided 0N/A * does not match any of the registered MBeans. 0N/A * @throws ListenerNotFoundException The listener is not 0N/A * registered in the MBean, or it is not registered with the given 0N/A * filter and handback. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to perform this operation. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * @throws RuntimeOperationsException Wraps an {@link 0N/A * IllegalArgumentException} when <code>name</code> or 0N/A * <code>listener</code> is null. 0N/A * @see #addNotificationListener 0N/A // Special Handling of Notifications ------------------------------------- 0N/A * <p>Handles the method {@link 0N/A * javax.management.MBeanServerConnection#addNotificationListener(ObjectName, 0N/A * NotificationListener, NotificationFilter, Object)}.</p> 0N/A * <p>Register for notifications from the given MBeans that match 0N/A * the given filters. The remote client can subsequently retrieve 0N/A * the notifications using the {@link #fetchNotifications 0N/A * fetchNotifications} method.</p> 0N/A * <p>For each listener, the original 0N/A * <code>NotificationListener</code> and <code>handback</code> are 0N/A * kept on the client side; in order for the client to be able to 0N/A * identify them, the server generates and returns a unique 0N/A * <code>listenerID</code>. This <code>listenerID</code> is 0N/A * forwarded with the <code>Notifications</code> to the remote 0N/A * <p>If any one of the given (name, filter) pairs cannot be 0N/A * registered, then the operation fails with an exception, and no 0N/A * names or filters are registered.</p> 0N/A * @param names the <code>ObjectNames</code> identifying the 0N/A * MBeans emitting the Notifications. 0N/A * @param filters an array of marshalled representations of the 0N/A * <code>NotificationFilters</code>. Elements of this array can 0N/A * @param delegationSubjects the <code>Subjects</code> on behalf 0N/A * of which the listeners are being added. Elements of this array 0N/A * can be null. Also, the <code>delegationSubjects</code> 0N/A * parameter itself can be null, which is equivalent to an array 0N/A * of null values with the same size as the <code>names</code> and 0N/A * <code>filters</code> arrays. 0N/A * @return an array of <code>listenerIDs</code> identifying the 0N/A * local listeners. This array has the same number of elements as 0N/A * @throws IllegalArgumentException if <code>names</code> or 0N/A * <code>filters</code> is null, or if <code>names</code> contains 0N/A * a null element, or if the three arrays do not all have the same 0N/A * @throws ClassCastException if one of the elements of 0N/A * <code>filters</code> unmarshalls as a non-null object that is 0N/A * not a <code>NotificationFilter</code>. 0N/A * @throws InstanceNotFoundException if one of the 0N/A * <code>names</code> does not correspond to any registered MBean. 0N/A * @throws SecurityException if, for one of the MBeans, the 0N/A * client, or the delegated Subject if any, does not have 0N/A * permission to add a listener. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * {@link javax.management.MBeanServerConnection#removeNotificationListener(ObjectName,NotificationListener) 0N/A * removeNotificationListener(ObjectName, NotificationListener)} and 0N/A * {@link javax.management.MBeanServerConnection#removeNotificationListener(ObjectName,NotificationListener,NotificationFilter,Object) 0N/A * removeNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object)} methods.</p> 0N/A * <p>This method removes one or more 0N/A * <code>NotificationListener</code>s from a given MBean in the 0N/A * <p>The <code>NotificationListeners</code> are identified by the 0N/A * IDs which were returned by the {@link 0N/A * #addNotificationListeners(ObjectName[], MarshalledObject[], 0N/A * Subject[])} method.</p> 0N/A * @param name the <code>ObjectName</code> identifying the MBean 0N/A * emitting the Notifications. 0N/A * @param listenerIDs the list of the IDs corresponding to the 0N/A * listeners to remove. 0N/A * @param delegationSubject The <code>Subject</code> containing the 0N/A * delegation principals or <code>null</code> if the authentication 0N/A * principal is used instead. 0N/A * @throws InstanceNotFoundException if the given 0N/A * <code>name</code> does not correspond to any registered MBean. 0N/A * @throws ListenerNotFoundException if one of the listeners was 0N/A * not found on the server side. This exception can happen if the 0N/A * MBean discarded a listener for some reason other than a call to 0N/A * <code>MBeanServer.removeNotificationListener</code>. 0N/A * @throws SecurityException if the client, or the delegated Subject 0N/A * if any, does not have permission to remove the listeners. 0N/A * @throws IOException if a general communication exception occurred. 0N/A * @throws IllegalArgumentException if <code>ObjectName</code> or 0N/A * <code>listenerIds</code> is null or if <code>listenerIds</code> 0N/A * contains a null element. 0N/A * <p>Retrieves notifications from the connector server. This 0N/A * method can block until there is at least one notification or 0N/A * until the specified timeout is reached. The method can also 0N/A * return at any time with zero notifications.</p> 0N/A * <p>A notification can be included in the result if its sequence 0N/A * number is no less than <code>clientSequenceNumber</code> and 0N/A * this client has registered at least one listener for the MBean 0N/A * generating the notification, with a filter that accepts the 0N/A * notification. Each listener that is interested in the 0N/A * notification is identified by an Integer ID that was returned 0N/A * by {@link #addNotificationListeners(ObjectName[], 0N/A * MarshalledObject[], Subject[])}.</p> 0N/A * @param clientSequenceNumber the first sequence number that the 0N/A * client is interested in. If negative, it is interpreted as 0N/A * meaning the sequence number that the next notification will 0N/A * @param maxNotifications the maximum number of different 0N/A * notifications to return. The <code>TargetedNotification</code> 0N/A * array in the returned <code>NotificationResult</code> can have 0N/A * more elements than this if the same notification appears more 0N/A * than once. The behavior is unspecified if this parameter is 0N/A * @param timeout the maximum time in milliseconds to wait for a 0N/A * notification to arrive. This can be 0 to indicate that the 0N/A * method should not wait if there are no notifications, but 0N/A * should return at once. It can be <code>Long.MAX_VALUE</code> 0N/A * to indicate that there is no timeout. The behavior is 0N/A * unspecified if this parameter is negative. 0N/A * @return A <code>NotificationResult</code>. 0N/A * @throws IOException if a general communication exception occurred.