This socket factory holds secure socket factory parameters. Besides the usual
configuration mechanism based on setting JavaBeans properties, this
component may also be configured by passing a series of attributes set
with calls to
setAttribute()
. The following attribute
names are recognized, with default values in square brackets:
- algorithm - Certificate encoding algorithm
to use. [SunX509]
- clientAuth - Require client authentication if
set to
true
. Want client authentication if set to
want
. (Note: Only supported in the JSSE included with
J2SDK 1.4 and above. Prior versions of JSSE and PureTLS will treat
'want' as 'false'.) [false]
- keystoreFile - Pathname to the Key Store file to be
loaded. This must be an absolute path, or a relative path that
is resolved against the "catalina.base" system property.
["./keystore" in the user home directory]
- keystorePass - Password for the Key Store file to be
loaded. ["changeit"]
- keystoreType - Type of the Key Store file to be
loaded. ["JKS"]
- protocol - SSL protocol to use. [TLS]
createSocket
public ServerSocket createSocket(int port)
Returns a server socket which uses all network interfaces on
the host, and is bound to a the specified port. The socket is
configured with the socket options (such as accept timeout)
given to this factory.
- createSocket in interface ServerSocketFactory
port
- the port to listen to
createSocket
public ServerSocket createSocket(int port,
int backlog)
Returns a server socket which uses all network interfaces on
the host, is bound to a the specified port, and uses the
specified connection backlog. The socket is configured with
the socket options (such as accept timeout) given to this factory.
- createSocket in interface ServerSocketFactory
port
- the port to listen tobacklog
- how many connections are queued
createSocket
public ServerSocket createSocket(int port,
int backlog,
InetAddress ifAddress)
Returns a server socket which uses only the specified network
interface on the local host, is bound to a the specified port,
and uses the specified connection backlog. The socket is configured
with the socket options (such as accept timeout) given to this factory.
- createSocket in interface ServerSocketFactory
port
- the port to listen tobacklog
- how many connections are queuedifAddress
- the network interface address to use
getAlgorithm
public String getAlgorithm()
getClientAuth
public String getClientAuth()
getKeystoreFile
public String getKeystoreFile()
getKeystorePass
public String getKeystorePass()
getKeystoreType
public String getKeystoreType()
getProtocol
public String getProtocol()
getRandomFile
public String getRandomFile()
getRootFile
public String getRootFile()
getSSLImplementation
public String getSSLImplementation()
setAlgorithm
public void setAlgorithm(String algorithm)
setClientAuth
public void setClientAuth(String clientAuth)
setKeystoreFile
public void setKeystoreFile(String keystoreFile)
setKeystorePass
public void setKeystorePass(String keystorePass)
setKeystoreType
public void setKeystoreType(String keystoreType)
setProtocol
public void setProtocol(String protocol)
setRandomFile
public void setRandomFile(String randomFile)
setRootFile
public void setRootFile(String rootFile)
setSSLImplementation
public void setSSLImplementation(String sslImplementation)