1 23 24 39 40 package com.sun.enterprise.admin.jmx.remote.server.rmi; 41 42 47 public class RemoteJmxProtocol { 48 49 private final String prtr; 50 51 public static final RemoteJmxProtocol RMIJRMP = new RemoteJmxProtocol("rmi_jrmp"); 52 53 public static final RemoteJmxProtocol RMIIIOP = new RemoteJmxProtocol("rmi_iiop"); 54 55 public static final RemoteJmxProtocol JMXMP = new RemoteJmxProtocol("jmxmp"); 56 57 58 private RemoteJmxProtocol(final String prtr) { 59 this.prtr = prtr; 60 } 61 62 public String getName() { 63 return ( this.prtr ); 64 } 65 66 public static RemoteJmxProtocol instance(final String prtr) { 67 if (RMIJRMP.getName().equals(prtr)) 68 return ( RMIJRMP ); 69 else if (RMIIIOP.getName().equals(prtr)) 70 return ( RMIIIOP ); 71 else if (JMXMP.getName().equals(prtr)) 72 return ( JMXMP ); 73 else 74 throw new UnsupportedOperationException ("Unsupported: " + prtr); 75 } 76 } | Popular Tags |