Class HttpServerConfigurationProperties

java.lang.Object
org.apache.camel.main.HttpServerConfigurationProperties
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.camel.spi.BootstrapCloseable

@Configurer(bootstrap=true) public class HttpServerConfigurationProperties extends Object implements org.apache.camel.spi.BootstrapCloseable
Configuration for embedded HTTP server for standalone Camel applications (not Spring Boot / Quarkus).
  • Constructor Details

  • Method Details

    • end

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • isEnabled

      public boolean isEnabled()
    • setEnabled

      public void setEnabled(boolean enabled)
      Whether embedded HTTP server is enabled. By default, the server is not enabled.
    • getHost

      public String getHost()
    • setHost

      public void setHost(String host)
      Hostname to use for binding embedded HTTP server
    • getPort

      public int getPort()
    • setPort

      public void setPort(int port)
      Port to use for binding embedded HTTP server
    • getPath

      public String getPath()
    • setPath

      public void setPath(String path)
      Context-path to use for embedded HTTP server
    • getMaxBodySize

      public Long getMaxBodySize()
    • setMaxBodySize

      public void setMaxBodySize(Long maxBodySize)
      Maximum HTTP body size the embedded HTTP server can accept.
    • isUseGlobalSslContextParameters

      public boolean isUseGlobalSslContextParameters()
    • setUseGlobalSslContextParameters

      public void setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters)
      Whether to use global SSL configuration for securing the embedded HTTP server.
    • isDevConsoleEnabled

      public boolean isDevConsoleEnabled()
    • setDevConsoleEnabled

      public void setDevConsoleEnabled(boolean devConsoleEnabled)
      Whether to enable developer console (not intended for production use). Dev console must also be enabled on CamelContext. For example by setting camel.context.dev-console=true in application.properties, or via code camelContext.setDevConsole(true); If enabled then you can access a basic developer console on context-path: /q/dev.
    • isHealthCheckEnabled

      public boolean isHealthCheckEnabled()
    • setHealthCheckEnabled

      public void setHealthCheckEnabled(boolean healthCheckEnabled)
      Whether to enable health-check console. If enabled then you can access health-check status on context-path: /q/health
    • isJolokiaEnabled

      public boolean isJolokiaEnabled()
    • setJolokiaEnabled

      public void setJolokiaEnabled(boolean jolokiaEnabled)
      Whether to enable jolokia. If enabled then you can access jolokia api on context-path: /q/jolokia
    • isMetricsEnabled

      public boolean isMetricsEnabled()
    • setMetricsEnabled

      public void setMetricsEnabled(boolean metricsEnabled)
      Whether to enable metrics. If enabled then you can access metrics on context-path: /q/metrics
    • isUploadEnabled

      public boolean isUploadEnabled()
    • setUploadEnabled

      public void setUploadEnabled(boolean uploadEnabled)
      Whether to enable file upload via HTTP (not intended for production use). This functionality is for development to be able to reload Camel routes and code with source changes (if reload is enabled). If enabled then you can upload/delete files via HTTP PUT/DELETE on context-path: /q/upload/{name}. You must also configure the uploadSourceDir option.
    • getUploadSourceDir

      public String getUploadSourceDir()
    • setUploadSourceDir

      public void setUploadSourceDir(String uploadSourceDir)
      Source directory when upload is enabled.
    • withEnabled

      public HttpServerConfigurationProperties withEnabled(boolean enabled)
      Whether embedded HTTP server is enabled. By default, the server is not enabled.
    • withHost

      public HttpServerConfigurationProperties withHost(String host)
      Hostname to use for binding embedded HTTP server
    • withPort

      public HttpServerConfigurationProperties withPort(int port)
      Port to use for binding embedded HTTP server
    • withPath

      public HttpServerConfigurationProperties withPath(String path)
      Context-path to use for embedded HTTP server
    • withMaxBodySize

      public HttpServerConfigurationProperties withMaxBodySize(long maxBodySize)
      Maximum HTTP body size the embedded HTTP server can accept.
    • withUseGlobalSslContextParameters

      public HttpServerConfigurationProperties withUseGlobalSslContextParameters(boolean useGlobalSslContextParameters)
      Whether to use global SSL configuration for securing the embedded HTTP server.
    • withDevConsoleEnabled

      public HttpServerConfigurationProperties withDevConsoleEnabled(boolean devConsoleEnabled)
      Whether to enable developer console (not intended for production use). Dev console must also be enabled on CamelContext. For example by setting camel.context.dev-console=true in application.properties, or via code camelContext.setDevConsole(true); If enabled then you can access a basic developer console on context-path: /q/dev.
    • withHealthCheckEnabled

      public HttpServerConfigurationProperties withHealthCheckEnabled(boolean healthCheckEnabled)
      Whether to enable health-check console. If enabled then you can access health-check status on context-path: /q/health
    • withJolokiaEnabled

      public HttpServerConfigurationProperties withJolokiaEnabled(boolean jolokiaEnabled)
      Whether to enable jolokia. If enabled then you can access jolokia api on context-path: /q/jolokia
    • withMetricsEnabled

      public HttpServerConfigurationProperties withMetricsEnabled(boolean metricsEnabled)
      Whether to enable metrics. If enabled then you can access metrics on context-path: /q/metrics
    • withUploadEnabled

      public HttpServerConfigurationProperties withUploadEnabled(boolean uploadEnabled)
      Whether to enable file upload via HTTP (not intended for production use). This functionality is for development to be able to reload Camel routes and code with source changes (if reload is enabled). If enabled then you can upload/delete files via HTTP PUT/DELETE on context-path: /q/upload/{name}. You must also configure the uploadSourceDir option.
    • withUploadSourceDir

      public HttpServerConfigurationProperties withUploadSourceDir(String uploadSourceDir)
      Source directory when upload is enabled.