KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > crypto > CipherServerSocketFactory


1 /*
2  * JBoss, the OpenSource EJB server
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.crypto;
8
9 import java.io.IOException JavaDoc;
10 import java.io.Serializable JavaDoc;
11 import java.net.ServerSocket JavaDoc;
12 import java.net.UnknownHostException JavaDoc;
13 import java.rmi.server.RMIServerSocketFactory JavaDoc;
14
15
16 /** An implementation of RMIServerSocketFactory that uses a
17  DomainServerSocketFactory for its implementation. This class is just an
18  adaptor from the RMIServerSocketFactory to the DomainServerSocketFactory.
19
20  This class is not suitable for RMI object that require a Serializable socket
21  factory like activatable services. The reason for this limitation is that
22  a SecurityDomain is not serializable due to its association with a local
23  KeyStore.
24
25 @author Scott.Stark@jboss.org
26 @version $Revision: 1.3 $
27 */

28 public class CipherServerSocketFactory implements RMIServerSocketFactory JavaDoc
29 {
30
31    /** Creates new RMISSLServerSocketFactory */
32    public CipherServerSocketFactory()
33    {
34    }
35
36
37    /**
38     * Create a server socket on the specified port (port 0 indicates
39     * an anonymous port).
40     * @param port the port number
41     * @return the server socket on the specified port
42     * @exception IOException if an I/O error occurs during server socket
43     * creation
44     */

45    public ServerSocket JavaDoc createServerSocket(int port)
46       throws IOException JavaDoc
47    {
48       CipherServerSocket socket = null;
49       return socket;
50    }
51
52    public boolean equals(Object JavaDoc obj)
53    {
54       return obj instanceof CipherServerSocketFactory;
55    }
56    public int hashCode()
57    {
58       return getClass().getName().hashCode();
59    }
60 }
61
Popular Tags