org.jboss.remoting.security
Class CustomSSLSocketFactory

java.lang.Object
  extended by javax.net.SocketFactory
      extended by javax.net.ssl.SSLSocketFactory
          extended by org.jboss.remoting.security.CustomSSLSocketFactory
Direct Known Subclasses:
SSLSocketFactoryService

public class CustomSSLSocketFactory
extends javax.net.ssl.SSLSocketFactory

SSL socket factory whose configuration is customized.

Version:
$Revision: 1099 $
Author:
John Mazzitelli

Constructor Summary
CustomSSLSocketFactory()
           
CustomSSLSocketFactory(javax.net.ssl.SSLSocketFactory factory, SSLSocketBuilder builder)
          Constructor for CustomSSLSocketFactory.
 
Method Summary
 java.net.Socket createSocket()
           
 java.net.Socket createSocket(java.net.InetAddress host, int port)
           
 java.net.Socket createSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddress, int localPort)
           
 java.net.Socket createSocket(java.net.Socket s, java.lang.String host, int port, boolean autoClose)
           
 java.net.Socket createSocket(java.lang.String host, int port)
           
 java.net.Socket createSocket(java.lang.String host, int port, java.net.InetAddress localHost, int localPort)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String[] getDefaultCipherSuites()
           
 SSLSocketBuilderMBean getSSLSocketBuilder()
          Returns the builder that created this factory.
 java.lang.String[] getSupportedCipherSuites()
           
 int hashCode()
           
 void setFactory(javax.net.ssl.SSLSocketFactory factory)
          Sets a new factory in this object - this is the factory that this object will use to create new sockets.
 void setSSLSocketBuilder(SSLSocketBuilderMBean sslSocketBuilder)
          Sets the builder that created the factory.
 java.lang.String toString()
           
 
Methods inherited from class javax.net.ssl.SSLSocketFactory
getDefault
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CustomSSLSocketFactory

public CustomSSLSocketFactory(javax.net.ssl.SSLSocketFactory factory,
                              SSLSocketBuilder builder)
Constructor for CustomSSLSocketFactory. The factory can be null - call setFactory(SSLSocketFactory) to set it later.

Parameters:
factory - the true factory this class delegates to
builder - the class that built this custom factory - contains all the configuration for this factory

CustomSSLSocketFactory

public CustomSSLSocketFactory()
Method Detail

setSSLSocketBuilder

public void setSSLSocketBuilder(SSLSocketBuilderMBean sslSocketBuilder)
Sets the builder that created the factory.

Parameters:
sslSocketBuilder -

getSSLSocketBuilder

public SSLSocketBuilderMBean getSSLSocketBuilder()
Returns the builder that created this factory. You can obtain the configuration of this factory by examining the returned object's configuration.

Returns:
the builder

setFactory

public void setFactory(javax.net.ssl.SSLSocketFactory factory)
Sets a new factory in this object - this is the factory that this object will use to create new sockets.

Parameters:
factory - the new factory
Throws:
java.lang.IllegalArgumentException - if factory is null

createSocket

public java.net.Socket createSocket(java.net.Socket s,
                                    java.lang.String host,
                                    int port,
                                    boolean autoClose)
                             throws java.io.IOException
Specified by:
createSocket in class javax.net.ssl.SSLSocketFactory
Throws:
java.io.IOException
See Also:
SSLSocketFactory.createSocket(java.net.Socket, java.lang.String, int, boolean)

createSocket

public java.net.Socket createSocket()
                             throws java.io.IOException
Overrides:
createSocket in class javax.net.SocketFactory
Throws:
java.io.IOException
See Also:
SocketFactory.createSocket()

createSocket

public java.net.Socket createSocket(java.net.InetAddress address,
                                    int port,
                                    java.net.InetAddress localAddress,
                                    int localPort)
                             throws java.io.IOException
Specified by:
createSocket in class javax.net.SocketFactory
Throws:
java.io.IOException
See Also:
SocketFactory.createSocket(java.net.InetAddress, int, java.net.InetAddress, int)

createSocket

public java.net.Socket createSocket(java.net.InetAddress host,
                                    int port)
                             throws java.io.IOException
Specified by:
createSocket in class javax.net.SocketFactory
Throws:
java.io.IOException
See Also:
SocketFactory.createSocket(java.net.InetAddress, int)

createSocket

public java.net.Socket createSocket(java.lang.String host,
                                    int port,
                                    java.net.InetAddress localHost,
                                    int localPort)
                             throws java.io.IOException,
                                    java.net.UnknownHostException
Specified by:
createSocket in class javax.net.SocketFactory
Throws:
java.io.IOException
java.net.UnknownHostException
See Also:
SocketFactory.createSocket(java.lang.String, int, java.net.InetAddress, int)

createSocket

public java.net.Socket createSocket(java.lang.String host,
                                    int port)
                             throws java.io.IOException,
                                    java.net.UnknownHostException
Specified by:
createSocket in class javax.net.SocketFactory
Throws:
java.io.IOException
java.net.UnknownHostException
See Also:
SocketFactory.createSocket(java.lang.String, int)

getDefaultCipherSuites

public java.lang.String[] getDefaultCipherSuites()
Specified by:
getDefaultCipherSuites in class javax.net.ssl.SSLSocketFactory
See Also:
SSLSocketFactory.getDefaultCipherSuites()

getSupportedCipherSuites

public java.lang.String[] getSupportedCipherSuites()
Specified by:
getSupportedCipherSuites in class javax.net.ssl.SSLSocketFactory
See Also:
SSLSocketFactory.getSupportedCipherSuites()

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 1998-2005 JBoss Inc . All Rights Reserved.