1 26 27 package org.objectweb.carol.ant; 28 29 32 final class CarolProtocol { 33 34 37 public static final CarolProtocol IIOP = protocol("iiop"); 38 39 42 public static final CarolProtocol JEREMIE = protocol("jeremie"); 43 44 47 public static final CarolProtocol JRMP11 = protocol("jrmp", "1.1", true); 48 49 52 public static final CarolProtocol JRMP12 = protocol("jrmp", "1.2", true); 53 54 57 public static final CarolProtocol IRMI11 = protocol("irmi", "1.1", true); 58 59 62 public static final CarolProtocol IRMI12 = protocol("irmi", "1.2", true); 63 64 67 private final String name; 68 69 72 private final String version; 73 74 77 private final boolean sunStubs; 78 79 85 private CarolProtocol(String name, String version, boolean sunStubs) { 86 this.name = name; 87 if (version == null) { 88 this.version = name; 89 } else { 90 this.version = name + version; 91 } 92 this.sunStubs = sunStubs; 93 } 94 95 100 private static CarolProtocol protocol(String name) { 101 return new CarolProtocol(name, null, false); 102 } 103 104 110 private static CarolProtocol protocol(String name, String version) { 111 return new CarolProtocol(name, version, false); 112 } 113 114 121 private static CarolProtocol protocol(String name, String version, boolean sunStubs) { 122 return new CarolProtocol(name, version, sunStubs); 123 } 124 125 128 public String getName() { 129 return name; 130 } 131 132 135 public String getNameVersion() { 136 return version; 137 } 138 139 142 public boolean useSunStubs() { 143 return sunStubs; 144 } 145 } 146 | Popular Tags |