< prev index next >

test/jdk/sun/management/jmxremote/bootstrap/RmiRegistrySslTestApp.java

Print this page
rev 51731 : imported patch 8210732


   7  * published by the Free Software Foundation.
   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 import java.rmi.registry.LocateRegistry;
  25 import java.rmi.registry.Registry;
  26 import javax.rmi.ssl.SslRMIClientSocketFactory;
  27 import jdk.testlibrary.Utils;
  28 
  29 
  30 public class RmiRegistrySslTestApp {
  31 
  32     static final String ok = "OK: Found jmxrmi entry in RMIRegistry!";
  33     static final String ko = "KO: Did not find jmxrmi entry in RMIRegistry!";
  34     static final String ko2 = "KO: Did not get expected exception!";
  35     static final String okException = "OK: Got expected exception!";
  36     static final String koException = "KO: Got unexpected exception!";
  37 
  38     public static void main(String args[]) throws Exception {
  39 
  40         System.out.println("RmiRegistry lookup...");
  41 
  42         String testID = System.getProperty("testID");
  43         int port = Integer.parseInt(System.getProperty("test.rmi.port"));
  44 
  45         if ("Test1".equals(testID)) {
  46             try {
  47                 Registry registry = LocateRegistry.getRegistry(port);




   7  * published by the Free Software Foundation.
   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 import java.rmi.registry.LocateRegistry;
  25 import java.rmi.registry.Registry;
  26 import javax.rmi.ssl.SslRMIClientSocketFactory;
  27 import jdk.test.lib.Utils;
  28 
  29 
  30 public class RmiRegistrySslTestApp {
  31 
  32     static final String ok = "OK: Found jmxrmi entry in RMIRegistry!";
  33     static final String ko = "KO: Did not find jmxrmi entry in RMIRegistry!";
  34     static final String ko2 = "KO: Did not get expected exception!";
  35     static final String okException = "OK: Got expected exception!";
  36     static final String koException = "KO: Got unexpected exception!";
  37 
  38     public static void main(String args[]) throws Exception {
  39 
  40         System.out.println("RmiRegistry lookup...");
  41 
  42         String testID = System.getProperty("testID");
  43         int port = Integer.parseInt(System.getProperty("test.rmi.port"));
  44 
  45         if ("Test1".equals(testID)) {
  46             try {
  47                 Registry registry = LocateRegistry.getRegistry(port);


< prev index next >