Class NettyHttpServerConfiguration.NettyListenerConfiguration

java.lang.Object
io.micronaut.http.server.netty.configuration.NettyHttpServerConfiguration.NettyListenerConfiguration
Enclosing class:
NettyHttpServerConfiguration

@EachProperty("listeners") public static final class NettyHttpServerConfiguration.NettyListenerConfiguration extends Object
Netty listener configuration.
Since:
3.5.0
Author:
yawkat
  • Constructor Details

    • NettyListenerConfiguration

      public NettyListenerConfiguration()
  • Method Details

    • createTcp

      @Internal public static NettyHttpServerConfiguration.NettyListenerConfiguration createTcp(@Nullable @Nullable 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
    • getFamily

      The address family of this listener.
      Returns:
      The address family of this listener.
    • setFamily

      The address family of this listener.
      Parameters:
      family - The address family of this listener.
    • 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 @Nullable 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 @Nullable 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 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(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.