|
||||||||||
| 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
org.ldaptive.ssl.AbstractTLSSocketFactory
public abstract class AbstractTLSSocketFactory
Provides common implementation for TLSSocketFactory.
| Field Summary | |
|---|---|
static String |
DEFAULT_PROTOCOL
Default SSL protocol, value is "TLS". |
protected SSLSocketFactory |
factory
SSLSocketFactory used for creating SSL sockets. |
protected org.slf4j.Logger |
logger
Logger for this class. |
| Constructor Summary | |
|---|---|
AbstractTLSSocketFactory()
|
|
| Method Summary | |
|---|---|
Socket |
createSocket()
Creates 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 port number at the specified address. |
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 port number at the specified address. |
Socket |
createSocket(String host,
int port,
InetAddress localHost,
int localPort)
Creates a socket and connect it to the specified port number at the specified address. |
String[] |
getDefaultCipherSuites()
Returns the list of cipher suites which are enabled by default. |
SSLSocketFactory |
getFactory()
Returns the underlying SSL socket factory that this class uses for creating SSL Sockets. |
HostnameVerifier |
getHostnameVerifier()
Returns the hostname verifier. |
SocketConfig |
getSocketConfig()
Returns the socket configuration used by this socket factory. |
SslConfig |
getSslConfig()
Returns the SSL configuration used by this socket factory. |
String[] |
getSupportedCipherSuites()
Returns the names of the cipher suites which could be enabled for use on an SSL connection. |
abstract void |
initialize()
Prepares this socket factory for use. |
protected SSLSocket |
initSSLSocket(SSLSocket socket)
Initializes the supplied socket for use. |
void |
setHostnameVerifier(HostnameVerifier verifier)
Sets the hostname verifier. |
void |
setSocketConfig(SocketConfig config)
Sets the socket configuration used by this socket factory. |
void |
setSslConfig(SslConfig config)
Sets the SSL configuration used by this socket factory. |
| Methods inherited from class javax.net.ssl.SSLSocketFactory |
|---|
getDefault |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_PROTOCOL
protected final org.slf4j.Logger logger
protected SSLSocketFactory factory
| Constructor Detail |
|---|
public AbstractTLSSocketFactory()
| Method Detail |
|---|
public abstract void initialize()
throws GeneralSecurityException
GeneralSecurityException - if the factory cannot be initializedpublic SSLSocketFactory getFactory()
public SslConfig getSslConfig()
public void setSslConfig(SslConfig config)
config - ssl configpublic HostnameVerifier getHostnameVerifier()
public void setHostnameVerifier(HostnameVerifier verifier)
verifier - hostname verifierpublic SocketConfig getSocketConfig()
public void setSocketConfig(SocketConfig config)
config - socket config
protected SSLSocket initSSLSocket(SSLSocket socket)
throws IOException
socket - SSL socket to initialize
IOException - if an I/O error occurs when initializing the socket
public Socket createSocket(Socket socket,
String host,
int port,
boolean autoClose)
throws IOException
createSocket in class SSLSocketFactorysocket - existing sockethost - server hostnameport - server portautoClose - close the underlying socket when this socket is closed
IOException - if an I/O error occurs when creating the socket
public Socket createSocket()
throws IOException
createSocket in class SocketFactoryIOException - if an I/O error occurs when creating the socket
public Socket createSocket(InetAddress host,
int port)
throws IOException
createSocket in class SocketFactoryhost - server hostnameport - server port
IOException - if an I/O error occurs when creating the socket
public Socket createSocket(InetAddress address,
int port,
InetAddress localAddress,
int localPort)
throws IOException
createSocket in class SocketFactoryaddress - server hostnameport - server portlocalAddress - client hostnamelocalPort - client port
IOException - if an I/O error occurs when creating the socket
public Socket createSocket(String host,
int port)
throws IOException
createSocket in class SocketFactoryhost - server hostnameport - server port
IOException - if an I/O error occurs when creating the socket
public Socket createSocket(String host,
int port,
InetAddress localHost,
int localPort)
throws IOException
createSocket in class SocketFactoryhost - server hostnameport - server portlocalHost - client hostnamelocalPort - client port
IOException - if an I/O error occurs when creating the socketpublic String[] getDefaultCipherSuites()
getDefaultCipherSuites in class SSLSocketFactorypublic String[] getSupportedCipherSuites()
getSupportedCipherSuites in class SSLSocketFactory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||