Interface HttpServerConfigurer


@Experimental @NoImplement @MinMuleVersion("4.10.0") public interface HttpServerConfigurer
Allows configuring instances of HttpServer.
Since:
0.12.0
  • Method Details

    • setName

      Sets a name to the resulting HttpServer.
      Parameters:
      name - the name.
      Returns:
      this configurer
    • setHost

      Defines the host where the requests will be sent to the HttpServer. Must be provided.
      Parameters:
      host - where to establish the server
      Returns:
      this configurer
    • setPort

      HttpServerConfigurer setPort(int port)
      Defines the port where the requests will be received by the HttpServer. Must be provided.
      Parameters:
      port - where to listen
      Returns:
      this configurer
    • setTlsContextFactory

      HttpServerConfigurer setTlsContextFactory(org.mule.runtime.api.tls.TlsContextFactory tlsContextFactory)
      Required exclusively for HTTPS, this defines through a TlsContextFactory all the TLS related data to establish such connections. Set to null by default.
      Parameters:
      tlsContextFactory - a TlsContextFactory with the required data.
      Returns:
      this configurer
    • setUsePersistentConnections

      HttpServerConfigurer setUsePersistentConnections(boolean usePersistentConnections)
      Defines if connections should be kept after a request is completed or closed. Default value is true.
      Parameters:
      usePersistentConnections - boolean specifying the decision
      Returns:
      this configurer
    • setConnectionIdleTimeout

      HttpServerConfigurer setConnectionIdleTimeout(int connectionIdleTimeout)
      Defines the number of milliseconds that a connection can remain idle before being closed. Only relevant if persistent connections are used, the default value is 30 seconds.
      Parameters:
      connectionIdleTimeout - timeout value (in milliseconds)
      Returns:
      this configurer
    • setSchedulerSupplier

      HttpServerConfigurer setSchedulerSupplier(Supplier<org.mule.runtime.api.scheduler.Scheduler> schedulerSupplier)
      Defines a Supplier for a Scheduler that will be used by the HttpServer to process requests. Must be specified if the server isn't associated with a flow, where a processing strategy will define the scheduling.
      Parameters:
      schedulerSupplier - a supplier for the scheduler.
      Returns:
      this configurer
    • setReadTimeout

      HttpServerConfigurer setReadTimeout(long readTimeout)
      Defines the number of milliseconds that should be waited when reading new input.
      Parameters:
      readTimeout - timeout value (in milliseconds)
      Returns:
      this configurer
    • configHttp1

      Enables/disables and configures HTTP/1 specific parameters.
      Parameters:
      configCallback - a callback that receives the Http1ProtocolConfigurer.
      Returns:
      this configurer
    • configHttp2

      Enables/disables and configures HTTP/2 specific parameters.
      Parameters:
      configCallback - a callback that receives the Http2ProtocolConfigurer.
      Returns:
      this configurer