< prev index next >

test/jdk/javax/management/remote/mandatory/connection/DefaultAgentFilterTest.java

Print this page
rev 51638 : [mq]: 8210112


   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24  /*
  25  * @test
  26  * @bug 8159377
  27  * @library /lib/testlibrary

  28  * @summary Tests ObjectFilter on default agent
  29  * @author Harsha Wardhana B
  30  * @modules java.management
  31  * @build jdk.testlibrary.* DefaultAgentFilterTest
  32  * @run main/othervm/timeout=600 -XX:+UsePerfData DefaultAgentFilterTest
  33  */
  34 import java.io.EOFException;
  35 import java.io.File;
  36 import java.io.IOException;
  37 import java.io.InvalidClassException;
  38 import java.io.Serializable;
  39 import java.lang.reflect.InvocationTargetException;
  40 import java.net.BindException;
  41 import java.rmi.UnmarshalException;
  42 import java.rmi.registry.LocateRegistry;
  43 import java.rmi.registry.Registry;
  44 import java.util.ArrayList;
  45 import java.util.Arrays;
  46 import java.util.HashMap;
  47 import java.util.HashSet;
  48 import java.util.List;
  49 import java.util.Map;
  50 import java.util.concurrent.atomic.AtomicBoolean;
  51 import javax.management.MBeanServerConnection;
  52 import javax.management.ObjectName;
  53 import javax.management.remote.JMXConnector;
  54 import javax.management.remote.JMXConnectorFactory;
  55 import javax.management.remote.JMXServiceURL;
  56 
  57 import jdk.testlibrary.ProcessTools;
  58 import jdk.testlibrary.Utils;
  59 
  60 public class DefaultAgentFilterTest {
  61 
  62     public static class MyTestObject implements Serializable {
  63 
  64         String a;
  65         int id;
  66     }
  67 
  68     public interface TestMBean {
  69 
  70         public void op1(HashSet<Object> params);
  71 
  72         public void op2(String s, HashSet<String> params);
  73 
  74         public void op3(MyTestObject obj, String s, HashMap<String, String> param);
  75     }
  76 
  77     public static class Test implements TestMBean {




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24  /*
  25  * @test
  26  * @bug 8159377
  27  * @library /lib/testlibrary
  28  * @library /test/lib
  29  * @summary Tests ObjectFilter on default agent
  30  * @author Harsha Wardhana B
  31  * @modules java.management
  32  * @build jdk.testlibrary.* DefaultAgentFilterTest
  33  * @run main/othervm/timeout=600 -XX:+UsePerfData DefaultAgentFilterTest
  34  */
  35 import java.io.EOFException;
  36 import java.io.File;
  37 import java.io.IOException;
  38 import java.io.InvalidClassException;
  39 import java.io.Serializable;
  40 import java.lang.reflect.InvocationTargetException;
  41 import java.net.BindException;
  42 import java.rmi.UnmarshalException;
  43 import java.rmi.registry.LocateRegistry;
  44 import java.rmi.registry.Registry;
  45 import java.util.ArrayList;
  46 import java.util.Arrays;
  47 import java.util.HashMap;
  48 import java.util.HashSet;
  49 import java.util.List;
  50 import java.util.Map;
  51 import java.util.concurrent.atomic.AtomicBoolean;
  52 import javax.management.MBeanServerConnection;
  53 import javax.management.ObjectName;
  54 import javax.management.remote.JMXConnector;
  55 import javax.management.remote.JMXConnectorFactory;
  56 import javax.management.remote.JMXServiceURL;
  57 
  58 import jdk.test.lib.process.ProcessTools;
  59 import jdk.testlibrary.Utils;
  60 
  61 public class DefaultAgentFilterTest {
  62 
  63     public static class MyTestObject implements Serializable {
  64 
  65         String a;
  66         int id;
  67     }
  68 
  69     public interface TestMBean {
  70 
  71         public void op1(HashSet<Object> params);
  72 
  73         public void op2(String s, HashSet<String> params);
  74 
  75         public void op3(MyTestObject obj, String s, HashMap<String, String> param);
  76     }
  77 
  78     public static class Test implements TestMBean {


< prev index next >