KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jacorb > orb > factory > ServerSocketFactory


1 package org.jacorb.orb.factory;
2
3 /*
4  * Written for JacORB - a free Java ORB
5  *
6  * Copyright (C) 1999-2004 Gerald Brose, André Benvenuti.
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the Free
20  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  */

22
23 /*
24  * We follow the design of socket factories in package javax.net and
25  * javax.net.ssl. Because this package isn't in the JDK yet we don't
26  * extend its classes, but we are fully compatible.
27  *
28  * The basic idea is to setup policies related to the sockets being
29  * constructed, in the factory: no special configuration is done in
30  * the code which asks for the sockets.
31  *
32  * @author André Benvenuti
33  * $Id: ServerSocketFactory.java,v 1.8 2004/05/06 12:40:00 nicolas Exp $
34  */

35
36 import java.net.*;
37 import java.io.IOException JavaDoc;
38
39 public interface ServerSocketFactory
40 {
41
42     public ServerSocket createServerSocket ( int port )
43         throws IOException JavaDoc;
44
45     /**
46      * Returns a server socket which uses all network interfaces on
47      * the host, and is bound to the specified port.
48      *
49      * @param int port - the port to listen to
50      *
51      * @exception IOException - for networking errors
52      */

53     public ServerSocket createServerSocket( int port,
54                                             int backlog )
55         throws IOException JavaDoc;
56
57     /**
58      * Returns a server socket which uses all network interfaces on
59      * the host, is bound to a the specified port, and uses the
60      * specified connection backlog. The socket is configured with the
61      * socket options (such as accept timeout) given to this factory.
62      *
63      * @param int port - the port to listen to
64      * @param in backlog - how many connections are queued
65      *
66      * @exception IOException - for networking errors
67      */

68     public ServerSocket createServerSocket( int port,
69                                             int backlog,
70                                             InetAddress ifAddress )
71         throws IOException JavaDoc;
72 }
73
Popular Tags