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() |
getDefault
protected final SSLSocketFactory wrappedFactory
protected final long connectTimeoutMilliseconds
public InterruptibleSocketFactory(SSLSocketFactory wrappedFactory, long connectTimeoutMilliseconds)
public Socket createSocket() throws IOException
createSocket
in class SocketFactory
IOException
public Socket createSocket(String host, int port) throws IOException, UnknownHostException
createSocket
in class SocketFactory
IOException
UnknownHostException
public Socket createSocket(InetAddress host, int port) throws IOException
createSocket
in class SocketFactory
IOException
public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException, UnknownHostException
createSocket
in class SocketFactory
IOException
UnknownHostException
public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException
createSocket
in class SocketFactory
IOException
public Socket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException
createSocket
in class SSLSocketFactory
IOException
public String[] getDefaultCipherSuites()
getDefaultCipherSuites
in class SSLSocketFactory
public String[] getSupportedCipherSuites()
getSupportedCipherSuites
in class SSLSocketFactory
protected Socket fireOffThread(InetAddress address, int port, InetAddress localHost, int localPort) throws IOException
IOException