|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.net.SocketFactory
javax.net.ssl.SSLSocketFactory
com.sptci.SSLSocketFactory
public class SSLSocketFactory
A wrapper around the standard SSLSocketFactory to
return a custom TrustManager that unconditionally
accepts certificates presented by a SSL server.
*
Copyright 2006 Sans Pareil Technologies, Inc.
| Constructor Summary | |
|---|---|
SSLSocketFactory()
Initialise an new instance of the wrapper factory. |
|
| Method Summary | |
|---|---|
Socket |
createSocket()
Create an unconnected socket. |
Socket |
createSocket(InetAddress host,
int port)
Creates a socket and connects it to the specified port number at the specified address. |
Socket |
createSocket(InetAddress address,
int port,
InetAddress localAddress,
int localPort)
Creates a socket and connect it to the specified remote address on the specified remote port. |
Socket |
createSocket(Socket socket,
String host,
int port,
boolean autoClose)
Returns a socket layered over an existing socket connected to the named host, at the given port. |
Socket |
createSocket(String host,
int port)
Creates a socket and connects it to the specified remote host at the specified remote port. |
Socket |
createSocket(String host,
int port,
InetAddress localHost,
int localPort)
Creates a socket and connects it to the specified remote host on the specified remote port. |
static SocketFactory |
getDefault()
Returns a copy of the environment's default socket factory. |
String[] |
getDefaultCipherSuites()
Returns the list of cipher suites which are enabled by default. |
String[] |
getSupportedCipherSuites()
Returns the names of the cipher suites which could be enabled for use on an SSL connection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SSLSocketFactory()
RuntimeException - If errors are encountered while
initialising the factory.| Method Detail |
|---|
public static SocketFactory getDefault()
public Socket createSocket()
throws IOException
createSocket in class SocketFactoryIOException - If the socket cannot be created.
public Socket createSocket(Socket socket,
String host,
int port,
boolean autoClose)
throws IOException
factory.
createSocket in class SSLSocketFactorysocket - The existing socket.host - The server host.port - The server port.autoClose - Close the underlying socket when this socket is
closed.
IOException - If errors are encountered while creating the
layered socket.
UnknownHostException - If the server host specified is
unknown.
public Socket createSocket(InetAddress host,
int port)
throws IOException
createSocket in class SocketFactoryhost - The server host.port - The server port.
IOException - If errors are encountered while creating the
layered socket.
public Socket createSocket(InetAddress address,
int port,
InetAddress localAddress,
int localPort)
throws IOException
createSocket in class SocketFactoryaddress - The server network address.port - The server port.localAddress - The client network address.localPort - The client port.
IOException - If errors are encountered while creating the
layered socket.
public Socket createSocket(String host,
int port)
throws IOException
factory.
createSocket in class SocketFactoryhost - The server host.port - The server port.
IOException - If errors are encountered while creating the
layered socket.
UnknownHostException - If the server host specified is
unknown.
public Socket createSocket(String host,
int port,
InetAddress localHost,
int localPort)
throws IOException
createSocket in class SocketFactoryhost - The server host.port - The server port.localHost - The local address the socket is bound to.localPort - The local port the socket is bound to.
IOException - If errors are encountered while creating the
layered socket.
UnknownHostException - If the server host specified is
unknown.public String[] getDefaultCipherSuites()
factory.
getDefaultCipherSuites in class SSLSocketFactorypublic String[] getSupportedCipherSuites()
factory.
getSupportedCipherSuites in class SSLSocketFactory
|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||