1. /*
  2. * @(#)SocketFactoryAcceptorImpl.java 1.17 04/06/21
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.corba.se.impl.legacy.connection;
  8. import java.io.IOException;
  9. import java.net.InetSocketAddress;
  10. import java.net.ServerSocket;
  11. import org.omg.CORBA.CompletionStatus;
  12. import org.omg.CORBA.INTERNAL;
  13. import com.sun.corba.se.spi.orb.ORB;
  14. import com.sun.corba.se.impl.orbutil.ORBUtility;
  15. import com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl;
  16. import com.sun.corba.se.impl.transport.SocketOrChannelAcceptorImpl;
  17. /**
  18. * @author Harold Carr
  19. */
  20. public class SocketFactoryAcceptorImpl
  21. extends
  22. SocketOrChannelAcceptorImpl
  23. {
  24. public SocketFactoryAcceptorImpl(ORB orb, int port,
  25. String name, String type)
  26. {
  27. super(orb, port, name, type);
  28. }
  29. ////////////////////////////////////////////////////
  30. //
  31. // pept Acceptor
  32. //
  33. public boolean initialize()
  34. {
  35. if (initialized) {
  36. return false;
  37. }
  38. if (orb.transportDebugFlag) {
  39. dprint("initialize: " + this);
  40. }
  41. try {
  42. serverSocket = orb.getORBData()
  43. .getLegacySocketFactory().createServerSocket(type, port);
  44. internalInitialize();
  45. } catch (Throwable t) {
  46. throw wrapper.createListenerFailed( t, Integer.toString(port) ) ;
  47. }
  48. initialized = true;
  49. return true;
  50. }
  51. ////////////////////////////////////////////////////
  52. //
  53. // Implementation.
  54. //
  55. protected String toStringName()
  56. {
  57. return "SocketFactoryAcceptorImpl";
  58. }
  59. protected void dprint(String msg)
  60. {
  61. ORBUtility.dprint(toStringName(), msg);
  62. }
  63. }
  64. // End of file.