KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > impl > legacy > connection > SocketFactoryAcceptorImpl


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
8 package com.sun.corba.se.impl.legacy.connection;
9
10 import java.io.IOException JavaDoc;
11 import java.net.InetSocketAddress JavaDoc;
12 import java.net.ServerSocket JavaDoc;
13
14 import org.omg.CORBA.CompletionStatus JavaDoc;
15 import org.omg.CORBA.INTERNAL JavaDoc;
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 /**
24  * @author Harold Carr
25  */

26 public class SocketFactoryAcceptorImpl
27     extends
28     SocketOrChannelAcceptorImpl
29 {
30     public SocketFactoryAcceptorImpl(ORB orb, int port,
31                      String JavaDoc name, String JavaDoc type)
32     {
33     super(orb, port, name, type);
34     }
35
36     ////////////////////////////////////////////////////
37
//
38
// pept Acceptor
39
//
40

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 JavaDoc t) {
54         throw wrapper.createListenerFailed( t, Integer.toString(port) ) ;
55     }
56     initialized = true;
57     return true;
58     }
59
60     ////////////////////////////////////////////////////
61
//
62
// Implementation.
63
//
64

65     protected String JavaDoc toStringName()
66     {
67     return "SocketFactoryAcceptorImpl";
68     }
69
70     protected void dprint(String JavaDoc msg)
71     {
72     ORBUtility.dprint(toStringName(), msg);
73     }
74 }
75
76 // End of file.
77
Popular Tags