org.ourgrid.common.security
Class MGSecureServerSocketFactory

java.lang.Object
  extended by org.ourgrid.common.security.MGSecureServerSocketFactory
All Implemented Interfaces:
java.io.Serializable, java.rmi.server.RMIServerSocketFactory

public class MGSecureServerSocketFactory
extends java.lang.Object
implements java.rmi.server.RMIServerSocketFactory, java.io.Serializable

The SSL Server SocketFactory. Based on the Sun's example.

See Also:
Serialized Form

Constructor Summary
protected MGSecureServerSocketFactory(java.lang.String keyStoreFilename, java.lang.String keyStorePassword)
          Creates a MGSecureServerSocketFactory.
 
Method Summary
 java.net.ServerSocket createServerSocket(int port)
          Creates a server socket that will only accept connections if it is certified.
static MGSecureServerSocketFactory getInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MGSecureServerSocketFactory

protected MGSecureServerSocketFactory(java.lang.String keyStoreFilename,
                                      java.lang.String keyStorePassword)
Creates a MGSecureServerSocketFactory.

Parameters:
keyStoreFilename - The keystore's filename.
keyStorePassword - The keystore's password.
Method Detail

createServerSocket

public java.net.ServerSocket createServerSocket(int port)
                                         throws java.io.IOException
Creates a server socket that will only accept connections if it is certified.

Specified by:
createServerSocket in interface java.rmi.server.RMIServerSocketFactory
Parameters:
port - The port.
Throws:
java.io.IOException

getInstance

public static MGSecureServerSocketFactory getInstance()