1 7 8 9 package com.sun.corba.se.impl.orb ; 10 11 import java.net.URL ; 12 13 import org.omg.CORBA.CompletionStatus ; 14 import org.omg.PortableInterceptor.ORBInitializer ; 15 16 import com.sun.corba.se.pept.transport.Acceptor; 17 18 import com.sun.corba.se.spi.ior.iiop.GIOPVersion ; 19 import com.sun.corba.se.spi.logging.CORBALogDomains ; 20 import com.sun.corba.se.spi.orb.DataCollector ; 21 import com.sun.corba.se.spi.orb.ORB ; 22 import com.sun.corba.se.spi.orb.ORBData ; 23 import com.sun.corba.se.spi.orb.ParserImplTableBase ; 24 import com.sun.corba.se.spi.orb.StringPair ; 25 import com.sun.corba.se.spi.transport.CorbaContactInfoListFactory; 26 import com.sun.corba.se.spi.transport.CorbaTransportManager; 27 import com.sun.corba.se.spi.transport.IORToSocketInfo; 28 import com.sun.corba.se.spi.transport.IIOPPrimaryToContactInfo; 29 import com.sun.corba.se.spi.transport.ReadTimeouts; 30 31 import com.sun.corba.se.impl.encoding.CodeSetComponentInfo ; 32 import com.sun.corba.se.impl.legacy.connection.USLPort; 33 import com.sun.corba.se.impl.orbutil.ORBClassLoader ; 34 import com.sun.corba.se.impl.orbutil.ORBConstants ; 35 import com.sun.corba.se.impl.logging.ORBUtilSystemException ; 36 37 38 public class ORBDataParserImpl extends ParserImplTableBase implements ORBData 39 { 40 private ORB orb ; 41 private ORBUtilSystemException wrapper ; 42 private String ORBInitialHost ; 43 private int ORBInitialPort ; 44 private String ORBServerHost ; 45 private int ORBServerPort ; 46 private String listenOnAllInterfaces; 47 private com.sun.corba.se.spi.legacy.connection.ORBSocketFactory legacySocketFactory ; 48 private com.sun.corba.se.spi.transport.ORBSocketFactory socketFactory; 49 private USLPort[] userSpecifiedListenPorts ; 50 private IORToSocketInfo iorToSocketInfo; 51 private IIOPPrimaryToContactInfo iiopPrimaryToContactInfo; 52 private String orbId ; 53 private boolean orbServerIdPropertySpecified ; 54 private URL servicesURL ; 55 private String propertyInitRef ; 56 private boolean allowLocalOptimization ; 57 private GIOPVersion giopVersion ; 58 private int highWaterMark ; 59 private int lowWaterMark ; 60 private int numberToReclaim ; 61 private int giopFragmentSize ; 62 private int giopBufferSize ; 63 private int giop11BuffMgr ; 64 private int giop12BuffMgr ; 65 private short giopTargetAddressPreference ; 66 private short giopAddressDisposition ; 67 private boolean useByteOrderMarkers ; 68 private boolean useByteOrderMarkersInEncaps ; 69 private boolean alwaysSendCodeSetCtx ; 70 private boolean persistentPortInitialized ; 71 private int persistentServerPort ; 72 private boolean persistentServerIdInitialized ; 73 private int persistentServerId ; 74 private boolean serverIsORBActivated ; 75 private Class badServerIdHandlerClass ; 76 private CodeSetComponentInfo.CodeSetComponent charData ; 77 private CodeSetComponentInfo.CodeSetComponent wcharData ; 78 private ORBInitializer [] orbInitializers ; 79 private StringPair[] orbInitialReferences ; 80 private String defaultInitRef ; 81 private String [] debugFlags ; 82 private Acceptor[] acceptors; 83 private CorbaContactInfoListFactory corbaContactInfoListFactory; 84 private String acceptorSocketType; 85 private boolean acceptorSocketUseSelectThreadToWait; 86 private boolean acceptorSocketUseWorkerThreadForEvent; 87 private String connectionSocketType; 88 private boolean connectionSocketUseSelectThreadToWait; 89 private boolean connectionSocketUseWorkerThreadForEvent; 90 private ReadTimeouts readTimeouts; 91 private boolean disableDirectByteBufferUse; 92 private boolean enableJavaSerialization; 93 private boolean useRepId; 94 95 private CodeSetComponentInfo codesets ; 97 98 100 public String getORBInitialHost() 101 { 102 return ORBInitialHost; 103 } 104 105 public int getORBInitialPort() 106 { 107 return ORBInitialPort; 108 } 109 110 public String getORBServerHost() 111 { 112 return ORBServerHost; 113 } 114 115 public String getListenOnAllInterfaces() 116 { 117 return listenOnAllInterfaces; 118 } 119 120 public int getORBServerPort() 121 { 122 return ORBServerPort; 123 } 124 125 public com.sun.corba.se.spi.legacy.connection.ORBSocketFactory getLegacySocketFactory() 126 { 127 return legacySocketFactory; 128 } 129 130 public com.sun.corba.se.spi.transport.ORBSocketFactory getSocketFactory() 131 { 132 return socketFactory; 133 } 134 135 public USLPort[] getUserSpecifiedListenPorts () 136 { 137 return userSpecifiedListenPorts; 138 } 139 140 public IORToSocketInfo getIORToSocketInfo() 141 { 142 return iorToSocketInfo; 143 } 144 145 public IIOPPrimaryToContactInfo getIIOPPrimaryToContactInfo() 146 { 147 return iiopPrimaryToContactInfo; 148 } 149 150 public String getORBId() 151 { 152 return orbId; 153 } 154 155 public boolean getORBServerIdPropertySpecified() 156 { 157 return orbServerIdPropertySpecified; 158 } 159 160 public boolean isLocalOptimizationAllowed() 161 { 162 return allowLocalOptimization ; 163 } 164 165 public GIOPVersion getGIOPVersion() 166 { 167 return giopVersion; 168 } 169 170 public int getHighWaterMark() 171 { 172 return highWaterMark; 173 } 174 175 public int getLowWaterMark() 176 { 177 return lowWaterMark; 178 } 179 180 public int getNumberToReclaim() 181 { 182 return numberToReclaim; 183 } 184 185 public int getGIOPFragmentSize() 186 { 187 return giopFragmentSize; 188 } 189 190 public int getGIOPBufferSize() 191 { 192 return giopBufferSize; 193 } 194 195 public int getGIOPBuffMgrStrategy(GIOPVersion gv) 196 { 197 if(gv!=null){ 198 if (gv.equals(GIOPVersion.V1_0)) return 0; if (gv.equals(GIOPVersion.V1_1)) return giop11BuffMgr; 200 if (gv.equals(GIOPVersion.V1_2)) return giop12BuffMgr; 201 } 202 return 0; 204 } 205 206 211 public short getGIOPTargetAddressPreference() 212 { 213 return giopTargetAddressPreference; 214 } 215 216 public short getGIOPAddressDisposition() 217 { 218 return giopAddressDisposition; 219 } 220 221 public boolean useByteOrderMarkers() 222 { 223 return useByteOrderMarkers; 224 } 225 226 public boolean useByteOrderMarkersInEncapsulations() 227 { 228 return useByteOrderMarkersInEncaps; 229 } 230 231 public boolean alwaysSendCodeSetServiceContext() 232 { 233 return alwaysSendCodeSetCtx; 234 } 235 236 public boolean getPersistentPortInitialized() 237 { 238 return persistentPortInitialized ; 239 } 240 241 247 public int getPersistentServerPort() 248 { 249 if ( persistentPortInitialized ) return persistentServerPort; 251 else { 252 throw wrapper.persistentServerportNotSet( 253 CompletionStatus.COMPLETED_MAYBE ); 254 } 255 } 256 257 public boolean getPersistentServerIdInitialized() 258 { 259 return persistentServerIdInitialized; 260 } 261 262 267 273 284 public int getPersistentServerId() 285 { 286 if ( persistentServerIdInitialized ) { 287 return persistentServerId; 288 } else { 289 throw wrapper.persistentServeridNotSet( 290 CompletionStatus.COMPLETED_MAYBE); 291 } 292 } 293 294 public boolean getServerIsORBActivated() 295 { 296 return serverIsORBActivated ; 297 } 298 299 public Class getBadServerIdHandler() 300 { 301 return badServerIdHandlerClass ; 302 } 303 304 308 public CodeSetComponentInfo getCodeSetComponentInfo() 309 { 310 return codesets; 311 } 312 313 public ORBInitializer [] getORBInitializers() 314 { 315 return orbInitializers ; 316 } 317 318 public StringPair[] getORBInitialReferences() 319 { 320 return orbInitialReferences ; 321 } 322 323 public String getORBDefaultInitialReference() 324 { 325 return defaultInitRef ; 326 } 327 328 public String [] getORBDebugFlags() 329 { 330 return debugFlags ; 331 } 332 333 public Acceptor[] getAcceptors() 334 { 335 return acceptors; 336 } 337 338 public CorbaContactInfoListFactory getCorbaContactInfoListFactory() 339 { 340 return corbaContactInfoListFactory; 341 } 342 343 public String acceptorSocketType() 344 { 345 return acceptorSocketType; 346 } 347 public boolean acceptorSocketUseSelectThreadToWait() 348 { 349 return acceptorSocketUseSelectThreadToWait; 350 } 351 public boolean acceptorSocketUseWorkerThreadForEvent() 352 { 353 return acceptorSocketUseWorkerThreadForEvent; 354 } 355 public String connectionSocketType() 356 { 357 return connectionSocketType; 358 } 359 public boolean connectionSocketUseSelectThreadToWait() 360 { 361 return connectionSocketUseSelectThreadToWait; 362 } 363 public boolean connectionSocketUseWorkerThreadForEvent() 364 { 365 return connectionSocketUseWorkerThreadForEvent; 366 } 367 public boolean isJavaSerializationEnabled() 368 { 369 return enableJavaSerialization; 370 } 371 public ReadTimeouts getTransportTCPReadTimeouts() 372 { 373 return readTimeouts; 374 } 375 public boolean disableDirectByteBufferUse() 376 { 377 return disableDirectByteBufferUse ; 378 } 379 public boolean useRepId() 380 { 381 return useRepId; 382 } 383 384 386 public ORBDataParserImpl( ORB orb, DataCollector coll ) 387 { 388 super( ParserTable.get().getParserData() ) ; 389 this.orb = orb ; 390 wrapper = ORBUtilSystemException.get( orb, CORBALogDomains.ORB_LIFECYCLE ) ; 391 init( coll ) ; 392 complete() ; 393 } 394 395 public void complete() 396 { 397 codesets = new CodeSetComponentInfo(charData, wcharData); 398 } 399 } 400 401 | Popular Tags |