KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mx4j > tools > adaptor > PlainAdaptorServerSocketFactory


1 /*
2  * Copyright (C) The MX4J Contributors.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the MX4J License version 1.0.
6  * See the terms of the MX4J License in the documentation provided with this software.
7  */

8
9 package mx4j.tools.adaptor;
10
11 import java.io.IOException JavaDoc;
12 import java.net.InetAddress JavaDoc;
13 import java.net.ServerSocket JavaDoc;
14
15 /**
16  * Creates plain ServerSockets.
17  *
18  * @version $Revision: 1.3 $
19  */

20 public class PlainAdaptorServerSocketFactory implements AdaptorServerSocketFactory
21 {
22    public ServerSocket JavaDoc createServerSocket(int port, int backlog, String JavaDoc host) throws IOException JavaDoc
23    {
24       return new ServerSocket JavaDoc(port, backlog, InetAddress.getByName(host));
25    }
26 }
27
Popular Tags