KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > ubik > net > MultiplexServerSocketFactory


1 package org.sapia.ubik.net;
2
3 import org.sapia.ubik.net.mplex.MultiplexServerSocket;
4
5 import java.io.IOException JavaDoc;
6
7 import java.net.InetAddress JavaDoc;
8 import java.net.ServerSocket JavaDoc;
9
10
11 /**
12  * @author Yanick Duchesne
13  * <dl>
14  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2003 <a HREF="http://www.sapia-oss.org">Sapia Open Source Software</a>. All Rights Reserved.</dd></dt>
15  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
16  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
17  * </dl>
18  */

19 public class MultiplexServerSocketFactory implements UbikServerSocketFactory {
20   /**
21    * @see org.sapia.ubik.net.UbikServerSocketFactory#createServerSocket(int, java.lang.String)
22    */

23   public ServerSocket createServerSocket(int port, String JavaDoc bindAddr)
24     throws IOException JavaDoc {
25     return new MultiplexServerSocket(port, 50, InetAddress.getByName(bindAddr));
26   }
27
28   /**
29    * @see java.rmi.server.RMIServerSocketFactory#createServerSocket(int)
30    */

31   public ServerSocket createServerSocket(int port) throws IOException JavaDoc {
32     return new MultiplexServerSocket(port);
33   }
34 }
35
Popular Tags