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