Module org.hsqldb

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 Details

    • configureSocket

      public void configureSocket(Socket socket)
      Overrides:
      configureSocket in class HsqlSocketFactory
    • createServerSocket

      public ServerSocket createServerSocket(int port) throws Exception
      Creates a secure server socket bound to the specified port. The socket is configured with the socket options given to this factory.
      Overrides:
      createServerSocket in class HsqlSocketFactory
      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

      public ServerSocket createServerSocket(int port, String address) throws Exception
      Creates a secure server socket bound to the specified port. The socket is configured with the socket options given to this factory.
      Overrides:
      createServerSocket in class HsqlSocketFactory
      Parameters:
      port - the port to which to bind the secure ServerSocket
      address - String
      Returns:
      the secure ServerSocket
      Throws:
      Exception - if a network or security provider error occurs
    • createSocket

      public Socket createSocket(Socket socket, String host, int port) throws Exception
      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:
      createSocket in class HsqlSocketFactory
      Parameters:
      socket - the existing socket
      host - the server host
      port - the server port
      Returns:
      the socket
      Throws:
      Exception - if a network or security provider error occurs
    • createSocket

      public Socket createSocket(String host, int port) throws Exception
      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:
      createSocket in class HsqlSocketFactory
      Parameters:
      host - the server host
      port - 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:
      isSecure in class HsqlSocketFactory
      Returns:
      true iff this factory creates secure sockets
    • handshakeCompleted

      public void handshakeCompleted(HandshakeCompletedEvent evt)
      Specified by:
      handshakeCompleted in interface HandshakeCompletedListener