equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
45 import javax.management.remote.JMXConnectorFactory; |
45 import javax.management.remote.JMXConnectorFactory; |
46 import javax.management.remote.JMXConnectorServer; |
46 import javax.management.remote.JMXConnectorServer; |
47 import javax.management.remote.JMXConnectorServerFactory; |
47 import javax.management.remote.JMXConnectorServerFactory; |
48 import javax.management.remote.JMXServiceURL; |
48 import javax.management.remote.JMXServiceURL; |
49 import com.sun.jmx.remote.internal.rmi.RMIExporter; |
49 import com.sun.jmx.remote.internal.rmi.RMIExporter; |
|
50 import java.io.ObjectInputFilter; |
50 |
51 |
51 public class RMIExporterTest { |
52 public class RMIExporterTest { |
52 |
53 |
53 public static class CustomRMIExporter implements RMIExporter { |
54 public static class CustomRMIExporter implements RMIExporter { |
54 |
55 |
58 public boolean rmiConnectionUnexported = false; |
59 public boolean rmiConnectionUnexported = false; |
59 |
60 |
60 public Remote exportObject(Remote obj, |
61 public Remote exportObject(Remote obj, |
61 int port, |
62 int port, |
62 RMIClientSocketFactory csf, |
63 RMIClientSocketFactory csf, |
63 RMIServerSocketFactory ssf) |
64 RMIServerSocketFactory ssf, |
|
65 ObjectInputFilter unused) |
64 throws RemoteException { |
66 throws RemoteException { |
65 System.out.println("CustomRMIExporter::exportObject():: " + |
67 System.out.println("CustomRMIExporter::exportObject():: " + |
66 "Remote = " + obj); |
68 "Remote = " + obj); |
67 if (obj.toString().startsWith( |
69 if (obj.toString().startsWith( |
68 "javax.management.remote.rmi.RMIJRMPServerImpl")) |
70 "javax.management.remote.rmi.RMIJRMPServerImpl")) |