public class InterruptibleSocketFactory extends SSLSocketFactory
| Modifier and Type | Class and Description |
|---|---|
protected static class |
InterruptibleSocketFactory.SocketCreateThread
Create a secure socket in a thread, so that we can "give up" after a while if the socket fails to connect.
|
| Modifier and Type | Field and Description |
|---|---|
protected long |
connectTimeoutMilliseconds |
protected SSLSocketFactory |
wrappedFactory |
| Constructor and Description |
|---|
InterruptibleSocketFactory(SSLSocketFactory wrappedFactory,
long connectTimeoutMilliseconds) |
| Modifier and Type | Method and Description |
|---|---|
Socket |
createSocket() |
Socket |
createSocket(InetAddress host,
int port) |
Socket |
createSocket(InetAddress address,
int port,
InetAddress localAddress,
int localPort) |
Socket |
createSocket(Socket s,
String host,
int port,
boolean autoClose) |
Socket |
createSocket(String host,
int port) |
Socket |
createSocket(String host,
int port,
InetAddress localHost,
int localPort) |
protected Socket |
fireOffThread(InetAddress address,
int port,
InetAddress localHost,
int localPort) |
String[] |
getDefaultCipherSuites() |
String[] |
getSupportedCipherSuites() |
getDefaultprotected final SSLSocketFactory wrappedFactory
protected final long connectTimeoutMilliseconds
public InterruptibleSocketFactory(SSLSocketFactory wrappedFactory, long connectTimeoutMilliseconds)
public Socket createSocket() throws IOException
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(String host, int port) throws IOException, UnknownHostException
createSocket in class SocketFactoryIOExceptionUnknownHostExceptionpublic Socket createSocket(InetAddress host, int port) throws IOException
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException, UnknownHostException
createSocket in class SocketFactoryIOExceptionUnknownHostExceptionpublic Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException
createSocket in class SSLSocketFactoryIOExceptionpublic String[] getDefaultCipherSuites()
getDefaultCipherSuites in class SSLSocketFactorypublic String[] getSupportedCipherSuites()
getSupportedCipherSuites in class SSLSocketFactoryprotected Socket fireOffThread(InetAddress address, int port, InetAddress localHost, int localPort) throws IOException
IOException