Class InterruptibleSocketFactory
- java.lang.Object
-
- javax.net.SocketFactory
-
- javax.net.ssl.SSLSocketFactory
-
- org.apache.manifoldcf.connectorcommon.common.InterruptibleSocketFactory
-
public class InterruptibleSocketFactory extends javax.net.ssl.SSLSocketFactorySSL Socket factory which wraps another socket factory but allows timeout on socket creation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classInterruptibleSocketFactory.SocketCreateThreadCreate a secure socket in a thread, so that we can "give up" after a while if the socket fails to connect.
-
Field Summary
Fields Modifier and Type Field Description protected longconnectTimeoutMillisecondsprotected javax.net.ssl.SSLSocketFactorywrappedFactory
-
Constructor Summary
Constructors Constructor Description InterruptibleSocketFactory(javax.net.ssl.SSLSocketFactory wrappedFactory, long connectTimeoutMilliseconds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.SocketcreateSocket()java.net.SocketcreateSocket(java.lang.String host, int port)java.net.SocketcreateSocket(java.lang.String host, int port, java.net.InetAddress localHost, int localPort)java.net.SocketcreateSocket(java.net.InetAddress host, int port)java.net.SocketcreateSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddress, int localPort)java.net.SocketcreateSocket(java.net.Socket s, java.lang.String host, int port, boolean autoClose)protected java.net.SocketfireOffThread(java.net.InetAddress address, int port, java.net.InetAddress localHost, int localPort)java.lang.String[]getDefaultCipherSuites()java.lang.String[]getSupportedCipherSuites()
-
-
-
Method Detail
-
createSocket
public java.net.Socket createSocket() throws java.io.IOException- Overrides:
createSocketin classjavax.net.SocketFactory- Throws:
java.io.IOException
-
createSocket
public java.net.Socket createSocket(java.lang.String host, int port) throws java.io.IOException, java.net.UnknownHostException- Specified by:
createSocketin classjavax.net.SocketFactory- Throws:
java.io.IOExceptionjava.net.UnknownHostException
-
createSocket
public java.net.Socket createSocket(java.net.InetAddress host, int port) throws java.io.IOException- Specified by:
createSocketin classjavax.net.SocketFactory- Throws:
java.io.IOException
-
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:
createSocketin classjavax.net.SocketFactory- Throws:
java.io.IOExceptionjava.net.UnknownHostException
-
createSocket
public java.net.Socket createSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddress, int localPort) throws java.io.IOException- Specified by:
createSocketin classjavax.net.SocketFactory- Throws:
java.io.IOException
-
createSocket
public java.net.Socket createSocket(java.net.Socket s, java.lang.String host, int port, boolean autoClose) throws java.io.IOException- Specified by:
createSocketin classjavax.net.ssl.SSLSocketFactory- Throws:
java.io.IOException
-
getDefaultCipherSuites
public java.lang.String[] getDefaultCipherSuites()
- Specified by:
getDefaultCipherSuitesin classjavax.net.ssl.SSLSocketFactory
-
getSupportedCipherSuites
public java.lang.String[] getSupportedCipherSuites()
- Specified by:
getSupportedCipherSuitesin classjavax.net.ssl.SSLSocketFactory
-
fireOffThread
protected java.net.Socket fireOffThread(java.net.InetAddress address, int port, java.net.InetAddress localHost, int localPort) throws java.io.IOException- Throws:
java.io.IOException
-
-