01: /*
02: * Copyright 1999-2004 The Apache Software Foundation
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.apache.tomcat.util.net;
18:
19: import java.io.*;
20: import java.net.*;
21:
22: /**
23: * Default server socket factory. Doesn't do much except give us
24: * plain ol' server sockets.
25: *
26: * @author db@eng.sun.com
27: * @author Harish Prabandham
28: */
29:
30: // Default implementation of server sockets.
31: //
32: // WARNING: Some of the APIs in this class are used by J2EE.
33: // Please talk to harishp@eng.sun.com before making any changes.
34: //
35: class DefaultServerSocketFactory extends ServerSocketFactory {
36:
37: DefaultServerSocketFactory() {
38: /* NOTHING */
39: }
40:
41: public ServerSocket createSocket(int port) throws IOException {
42: return new ServerSocket(port);
43: }
44:
45: public ServerSocket createSocket(int port, int backlog)
46: throws IOException {
47: return new ServerSocket(port, backlog);
48: }
49:
50: public ServerSocket createSocket(int port, int backlog,
51: InetAddress ifAddress) throws IOException {
52: return new ServerSocket(port, backlog, ifAddress);
53: }
54:
55: public Socket acceptSocket(ServerSocket socket) throws IOException {
56: return socket.accept();
57: }
58:
59: public void handshake(Socket sock) throws IOException {
60: ; // NOOP
61: }
62:
63: }
|