Class URLEndpointListenerConfiguration

  • public class URLEndpointListenerConfiguration
    extends Object
    Configuration information for a URL endpoint listener. There are two varieties: Http and Tls.
    • Constructor Detail

      • URLEndpointListenerConfiguration

        public URLEndpointListenerConfiguration​(@NonNull
                                                Database database)
        Create a listener configuration, for the specified database, with default values.
        database - the database to which the listener is attached
      • URLEndpointListenerConfiguration

        public URLEndpointListenerConfiguration​(@NonNull
                                                URLEndpointListenerConfiguration config)
        Clone the passed listener configuration.
        config - the configuration to duplicate
      • URLEndpointListenerConfiguration

        public URLEndpointListenerConfiguration​(@NonNull
                                                Database database,
                                                String networkInterface,
                                                int port,
                                                boolean disableTls,
                                                TLSIdentity identity,
                                                ListenerAuthenticator authenticator,
                                                boolean readOnly,
                                                boolean enableDeltaSync)
    • Method Detail

      • getDatabase

        public Database getDatabase()
        Get the configured database.
        the configured database.
      • getNetworkInterface

        public String getNetworkInterface()
        Get the configured network interface.
        the configured network interface.
      • setNetworkInterface

        public void setNetworkInterface​(@Nullable
                                        String networkInterface)
        Set the configured network interface.
        networkInterface - the name of the interface on which to configure the listener (e.g. "en0")
      • getPort

        public int getPort()
        Get the configured port.
        the configured port.
      • setPort

        public void setPort​(int port)
        Set the configured port. A port number of 0 (the default) tells the OS to choose some available port.
        port - the port number on which to configure the listener (between 0 and 65535, inclusive)
      • isTlsDisabled

        public boolean isTlsDisabled()
        Get configured connection type.
        true if this configuration will disable TLS in its associated listener.
      • setDisableTls

        public void setDisableTls​(boolean disableTls)
        Set the configured security protocol. TLS is enabled by default. disabling it is not recommended for production.
        disableTls - true to disable TLS security.
      • getTlsIdentity

        public TLSIdentity getTlsIdentity()
        Get the configured TLS identity.
        the TLS identity for the associated listener.
      • setTlsIdentity

        public void setTlsIdentity​(@Nullable
                                   TLSIdentity identity)
        Set the certificates and keys for the associated listener.
        identity - a TLSIdentity that the listener will supply to authenticate itself.
      • getAuthenticator

        public ListenerAuthenticator getAuthenticator()
        Get the configured authenticator.
        the authenticator for the associated listener.
      • setAuthenticator

        public void setAuthenticator​(@Nullable
                                     ListenerAuthenticator authenticator)
        Set the authenticator. When TLS is enabled, a null authenticator (the default) will allow clients whose certificate chains can be verified by one of the OS-bundled root certificates. There are two types of TLS authenticators. See ListenerCertificateAuthenticator

        When TLS is disabled, a null authenticator (the default) will allow all clients. A non-null authenticator will be passed the client's credentials and is completely responsible for authenticating them. See ListenerPasswordAuthenticator

        authenticator - the client authenticator
      • isReadOnly

        public boolean isReadOnly()
        Is connection read-only.
        true if the connections is read-only.
      • setReadOnly

        public void setReadOnly​(boolean readOnly)
        Set the connection read-only.
        readOnly - set true to make the configured listener read-only
      • isDeltaSyncEnabled

        public boolean isDeltaSyncEnabled()
        Is delta sync enabled.
        true if delta sync is enabled.
      • setEnableDeltaSync

        public void setEnableDeltaSync​(boolean enableDeltaSync)
        Set delta sync enabled.
        enableDeltaSync - set true to enable delta sync