Class HsqlSocketFactorySecure
java.lang.Object
org.hsqldb.server.HsqlSocketFactory
org.hsqldb.server.HsqlSocketFactorySecure
- All Implemented Interfaces:
EventListener, HandshakeCompletedListener
public final class HsqlSocketFactorySecure
extends HsqlSocketFactory
implements 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
Modifier and TypeMethodDescriptionvoidconfigureSocket(Socket socket) createServerSocket(int port) Creates a secure server socket bound to the specified port.createServerSocket(int port, String address) Creates a secure server socket bound to the specified port.createSocket(String host, int port) Creates a secure Socket and connects it to the specified remote host at the specified remote port.createSocket(Socket socket, String host, int port) if socket argument is not null, creates a secure Socket as a wrapper for the normal, non-SSL socket.voidbooleanisSecure()Retrieves whether this factory produces secure sockets.Methods inherited from class HsqlSocketFactory
getInstance
-
Method Details
-
configureSocket
- Overrides:
configureSocketin classHsqlSocketFactory
-
createServerSocket
Creates 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:
Exception- if a network or security provider error occurs
-
createServerSocket
Creates 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:
Exception- if a network or security provider error occurs
-
createSocket
if 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:
Exception- if a network or security provider error occurs
-
createSocket
Creates 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:
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
- Specified by:
handshakeCompletedin interfaceHandshakeCompletedListener
-