- java.lang.Object
-
- org.hsqldb.server.HsqlSocketFactory
-
- org.hsqldb.server.HsqlSocketFactorySecure
-
- All Implemented Interfaces:
java.util.EventListener,javax.net.ssl.HandshakeCompletedListener
public final class HsqlSocketFactorySecure extends HsqlSocketFactory implements javax.net.ssl.HandshakeCompletedListener
The default secure socket factory implementation.- Since:
- 1.7.2
- Author:
- Campbell Burnet (campbell-burnet@users dot sourceforge.net), Blaine Simpson (blaine dot simpson at admc dot com)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigureSocket(java.net.Socket socket)java.net.ServerSocketcreateServerSocket(int port)Creates a secure server socket bound to the specified port.java.net.ServerSocketcreateServerSocket(int port, java.lang.String address)Creates a secure server socket bound to the specified port.java.net.SocketcreateSocket(java.lang.String host, int port)Creates a secure Socket and connects it to the specified remote host at the specified remote port.java.net.SocketcreateSocket(java.net.Socket socket, java.lang.String host, int port)if socket argument is not null, creates a secure Socket as a wrapper for the normal, non-SSL socket.voidhandshakeCompleted(javax.net.ssl.HandshakeCompletedEvent evt)booleanisSecure()Retrieves whether this factory produces secure sockets.-
Methods inherited from class org.hsqldb.server.HsqlSocketFactory
getInstance
-
-
-
-
Method Detail
-
configureSocket
public void configureSocket(java.net.Socket socket)
- Overrides:
configureSocketin classHsqlSocketFactory
-
createServerSocket
public java.net.ServerSocket createServerSocket(int port) throws java.lang.ExceptionCreates a secure server socket bound to the specified port. The socket is configured with the socket options given to this factory.- Overrides:
createServerSocketin classHsqlSocketFactory- Parameters:
port- the port to which to bind the secure ServerSocket- Returns:
- the secure ServerSocket
- Throws:
java.lang.Exception- if a network or security provider error occurs
-
createServerSocket
public java.net.ServerSocket createServerSocket(int port, java.lang.String address) throws java.lang.ExceptionCreates a secure server socket bound to the specified port. The socket is configured with the socket options given to this factory.- Overrides:
createServerSocketin classHsqlSocketFactory- Parameters:
port- the port to which to bind the secure ServerSocketaddress- String- Returns:
- the secure ServerSocket
- Throws:
java.lang.Exception- if a network or security provider error occurs
-
createSocket
public java.net.Socket createSocket(java.net.Socket socket, java.lang.String host, int port) throws java.lang.Exceptionif socket argument is not null, creates a secure Socket as a wrapper for the normal, non-SSL socket. If the socket is null, create a new secure socket. The secure socket is configured using the socket options established for this factory.- Overrides:
createSocketin classHsqlSocketFactory- Parameters:
socket- the existing sockethost- the server hostport- the server port- Returns:
- the socket
- Throws:
java.lang.Exception- if a network or security provider error occurs
-
createSocket
public java.net.Socket createSocket(java.lang.String host, int port) throws java.lang.ExceptionCreates a secure Socket and connects it to the specified remote host at the specified remote port. This socket is configured using the socket options established for this factory.- Overrides:
createSocketin classHsqlSocketFactory- Parameters:
host- the server hostport- the server port- Returns:
- the socket
- Throws:
java.lang.Exception- if a network or security provider error occurs
-
isSecure
public boolean isSecure()
Retrieves whether this factory produces secure sockets.- Overrides:
isSecurein classHsqlSocketFactory- Returns:
- true iff this factory creates secure sockets
-
handshakeCompleted
public void handshakeCompleted(javax.net.ssl.HandshakeCompletedEvent evt)
- Specified by:
handshakeCompletedin interfacejavax.net.ssl.HandshakeCompletedListener
-
-