1 7 8 package com.sun.corba.se.impl.legacy.connection; 9 10 import java.io.IOException ; 11 import java.net.InetSocketAddress ; 12 import java.net.ServerSocket ; 13 14 import org.omg.CORBA.CompletionStatus ; 15 import org.omg.CORBA.INTERNAL ; 16 17 import com.sun.corba.se.spi.orb.ORB; 18 19 import com.sun.corba.se.impl.orbutil.ORBUtility; 20 import com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl; 21 import com.sun.corba.se.impl.transport.SocketOrChannelAcceptorImpl; 22 23 26 public class SocketFactoryAcceptorImpl 27 extends 28 SocketOrChannelAcceptorImpl 29 { 30 public SocketFactoryAcceptorImpl(ORB orb, int port, 31 String name, String type) 32 { 33 super(orb, port, name, type); 34 } 35 36 41 public boolean initialize() 42 { 43 if (initialized) { 44 return false; 45 } 46 if (orb.transportDebugFlag) { 47 dprint("initialize: " + this); 48 } 49 try { 50 serverSocket = orb.getORBData() 51 .getLegacySocketFactory().createServerSocket(type, port); 52 internalInitialize(); 53 } catch (Throwable t) { 54 throw wrapper.createListenerFailed( t, Integer.toString(port) ) ; 55 } 56 initialized = true; 57 return true; 58 } 59 60 65 protected String toStringName() 66 { 67 return "SocketFactoryAcceptorImpl"; 68 } 69 70 protected void dprint(String msg) 71 { 72 ORBUtility.dprint(toStringName(), msg); 73 } 74 } 75 76 | Popular Tags |