Class NettyHttpServerConfiguration.NettyListenerConfiguration

  • Enclosing class:
    NettyHttpServerConfiguration

    @EachProperty("listeners")
    public static final class NettyHttpServerConfiguration.NettyListenerConfiguration
    extends java.lang.Object
    Netty listener configuration.
    Since:
    3.5.0
    • Constructor Detail

      • NettyListenerConfiguration

        public NettyListenerConfiguration()
    • Method Detail

      • createTcp

        @Internal
        public static NettyHttpServerConfiguration.NettyListenerConfiguration createTcp​(@Nullable
                                                                                        java.lang.String host,
                                                                                        int port,
                                                                                        boolean ssl)
        Create a TCP listener configuration.
        Parameters:
        host - The host to bind to
        port - The port to bind to
        ssl - Whether to enable SSL
        Returns:
        The configuration with the given settings
      • isSsl

        public boolean isSsl()
        Whether to enable SSL on this listener. Also requires SslConfiguration.isEnabled() to be set.
        Returns:
        Whether to enable SSL on this listener.
      • setSsl

        public void setSsl​(boolean ssl)
        Whether to enable SSL on this listener. Also requires SslConfiguration.isEnabled() to be set.
        Parameters:
        ssl - Whether to enable SSL on this listener.
      • getHost

        @Nullable
        public java.lang.String getHost()
        For TCP listeners, the host to bind to, or null to bind to all hosts.
        Returns:
        For TCP listeners, the host to bind to, or null to bind to all hosts.
      • setHost

        public void setHost​(@Nullable
                            java.lang.String host)
        For TCP listeners, the host to bind to, or null to bind to all hosts.
        Parameters:
        host - For TCP listeners, the host to bind to, or null to bind to all hosts.
      • getPort

        public int getPort()
        The TCP port to bind to. May be -1 to bind to a random port.
        Returns:
        The TCP port to bind to. May be -1 to bind to a random port.
      • setPort

        public void setPort​(int port)
        The TCP port to bind to. May be -1 to bind to a random port.
        Parameters:
        port - The TCP port to bind to. May be -1 to bind to a random port.
      • getPath

        public java.lang.String getPath()
        For UNIX domain sockets, the path of the socket. For abstract domain sockets, this should start with a NUL byte.
        Returns:
        For UNIX domain sockets, the path of the socket. For abstract domain sockets, this should start with a NUL byte.
      • setPath

        public void setPath​(java.lang.String path)
        For UNIX domain sockets, the path of the socket. For abstract domain sockets, this should start with a NUL byte.
        Parameters:
        path - For UNIX domain sockets, the path of the socket. For abstract domain sockets, this should start with a NUL byte.
      • isExposeDefaultRoutes

        @Internal
        public boolean isExposeDefaultRoutes()
        Whether to expose default routes on this listener.
        Returns:
        Whether to expose default routes on this listener.
      • setExposeDefaultRoutes

        @Internal
        public void setExposeDefaultRoutes​(boolean exposeDefaultRoutes)
        Whether to expose default routes on this listener.
        Parameters:
        exposeDefaultRoutes - Whether to expose default routes on this listener.