1 7 8 package com.sun.corba.se.impl.legacy.connection; 9 10 import com.sun.corba.se.pept.transport.Connection; 11 12 import com.sun.corba.se.spi.orb.ORB; 13 import com.sun.corba.se.spi.ior.IOR; 14 import com.sun.corba.se.spi.logging.CORBALogDomains; 15 import com.sun.corba.se.spi.transport.CorbaContactInfoList; 16 import com.sun.corba.se.spi.transport.SocketInfo; 17 18 import com.sun.corba.se.impl.logging.ORBUtilSystemException; 19 import com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl; 20 21 22 25 public class SocketFactoryContactInfoImpl 26 extends 27 SocketOrChannelContactInfoImpl 28 { 29 protected ORBUtilSystemException wrapper; 30 protected SocketInfo socketInfo; 31 32 public SocketFactoryContactInfoImpl() 37 { 38 } 39 40 public SocketFactoryContactInfoImpl( 41 ORB orb, 42 CorbaContactInfoList contactInfoList, 43 IOR effectiveTargetIOR, 44 short addressingDisposition, 45 SocketInfo cookie) 46 { 47 super(orb, contactInfoList); 48 this.effectiveTargetIOR = effectiveTargetIOR; 49 this.addressingDisposition = addressingDisposition; 50 51 wrapper = ORBUtilSystemException.get( orb, 52 CORBALogDomains.RPC_TRANSPORT ) ; 53 54 socketInfo = 55 orb.getORBData().getLegacySocketFactory() 56 .getEndPointInfo(orb, effectiveTargetIOR, cookie); 57 58 socketType = socketInfo.getType(); 59 hostname = socketInfo.getHost(); 60 port = socketInfo.getPort(); 61 } 62 63 68 public Connection createConnection() 69 { 70 Connection connection = 71 new SocketFactoryConnectionImpl( 72 orb, this, 73 orb.getORBData().connectionSocketUseSelectThreadToWait(), 74 orb.getORBData().connectionSocketUseWorkerThreadForEvent()); 75 return connection; 76 } 77 78 83 public String toString() 84 { 85 return 86 "SocketFactoryContactInfoImpl[" 87 + socketType + " " 88 + hostname + " " 89 + port 90 + "]"; 91 } 92 } 93 94 | Popular Tags |