Known Direct Subclasses
SSLCertificateSocketFactory |
SSLSocketFactory implementation with several extra features:
- Timeout specification for SSL handshake operations
- Hostname verification in most cases (see WARNINGs below)
- Optional SSL session caching with
SSLSessionCache
- Optionally bypass all SSL certificate checks
The handshake timeout does not apply to actual TCP socket connection. |
|
Class Overview
The abstract factory implementation to create SSLSocket
s.
Summary
[Expand]
Inherited Methods |
From class
javax.net.SocketFactory
abstract
Socket
|
createSocket(String host, int port, InetAddress localHost, int localPort)
Creates a new socket which is connected to the remote host specified by
the parameters host and port .
|
abstract
Socket
|
createSocket(InetAddress address, int port, InetAddress localAddress, int localPort)
Creates a new socket which is connected to the remote host specified by
the InetAddress address .
|
abstract
Socket
|
createSocket(InetAddress host, int port)
Creates a new socket which is connected to the remote host specified by
the InetAddress host .
|
abstract
Socket
|
createSocket(String host, int port)
Creates a new socket which is connected to the remote host specified by
the parameters host and port .
|
Socket
|
createSocket()
Creates a new socket which is not connected to any remote host.
|
synchronized
static
SocketFactory
|
getDefault()
Gets the default socket factory of the system which can be used to create
new sockets without creating a subclass of this factory.
|
|
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Called before the object's memory is reclaimed by the VM.
|
final
Class<?>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
|
Public Constructors
public
SSLSocketFactory
()
Creates a new SSLSocketFactory
.
Public Methods
public
abstract
Socket
createSocket
(Socket s, String host, int port, boolean autoClose)
Creates an SSLSocket
over the specified socket that is connected
to the specified host at the specified port.
Parameters
s
| the socket. |
host
| the host. |
port
| the port number. |
autoClose
| true if socket s should be closed when the
created socket is closed, false if the socket
s should be left open. |
public
static
synchronized
SocketFactory
getDefault
()
Returns the default SSLSocketFactory
instance. The default is
defined by the security property 'ssl.SocketFactory.provider'
.
Returns
- the default ssl socket factory instance.
public
abstract
String[]
getDefaultCipherSuites
()
Returns the names of the cipher suites that are enabled by default.
Returns
- the names of the cipher suites that are enabled by default.
public
abstract
String[]
getSupportedCipherSuites
()
Returns the names of the cipher suites that are supported and could be
enabled for an SSL connection.
Returns
- the names of the cipher suites that are supported.