Class HttpServerConfigurationProperties

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

@Configurer(extended=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.
    • isFileUploadEnabled

      public boolean isFileUploadEnabled()
    • setFileUploadEnabled

      public void setFileUploadEnabled(boolean fileUploadEnabled)
      Whether to enable file uploads being supported (such as POST multipart/form-data) and stored into a temporary directory.
    • getFileUploadDirectory

      public String getFileUploadDirectory()
    • setFileUploadDirectory

      public void setFileUploadDirectory(String fileUploadDirectory)
      Directory to temporary store file uploads while Camel routes the incoming request. If no directory has been explicit configured, then a temporary directory is created in the java.io.tmpdir directory.
    • isInfoEnabled

      @Deprecated(since="4.12.0") public boolean isInfoEnabled()
      Deprecated.
    • setInfoEnabled

      public void setInfoEnabled(boolean infoEnabled)
      Whether to enable info console. If enabled then you can see some basic Camel information at /q/info. Deprecated since 4.12.0, use HTTP management server instead.
    • isStaticEnabled

      public boolean isStaticEnabled()
    • setStaticEnabled

      public void setStaticEnabled(boolean staticEnabled)
      Whether serving static files is enabled. If enabled then Camel can host html/js and other web files that makes it possible to include small web applications.
    • getStaticSourceDir

      public String getStaticSourceDir()
    • setStaticSourceDir

      public void setStaticSourceDir(String staticSourceDir)
      Additional directory that holds static content when static is enabled.
    • getStaticContextPath

      public String getStaticContextPath()
    • setStaticContextPath

      public void setStaticContextPath(String staticContextPath)
      The context-path to use for serving static content. By default, the root path is used. And if there is an index.html page then this is automatically loaded.
    • 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. Deprecated since 4.12.0, use HTTP management server instead.
    • isHealthCheckEnabled

      @Deprecated(since="4.12.0") public boolean isHealthCheckEnabled()
      Deprecated.
    • 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 (default). Deprecated since 4.12.0, use HTTP management server instead.
    • isJolokiaEnabled

      @Deprecated(since="4.12.0") public boolean isJolokiaEnabled()
      Deprecated.
    • setJolokiaEnabled

      public void setJolokiaEnabled(boolean jolokiaEnabled)
      Whether to enable jolokia. If enabled then you can access jolokia api on context-path: /q/jolokia. Deprecated since 4.12.0, use HTTP management server instead.
    • isMetricsEnabled

      @Deprecated(since="4.12.0") public boolean isMetricsEnabled()
      Deprecated.
    • setMetricsEnabled

      public void setMetricsEnabled(boolean metricsEnabled)
      Whether to enable metrics. If enabled then you can access metrics on context-path: /q/metrics (default). Deprecated since 4.12.0, use HTTP management server instead.
    • getHealthPath

      @Deprecated(since="4.12.0") public String getHealthPath()
      Deprecated.
    • setHealthPath

      public void setHealthPath(String healthPath)
      The path endpoint used to expose the health status. Deprecated since 4.12.0, use HTTP management server instead.
    • getJolokiaPath

      @Deprecated(since="4.12.0") public String getJolokiaPath()
      Deprecated.
    • setJolokiaPath

      public void setJolokiaPath(String jolokiaPath)
      The path endpoint used to expose the jolokia data. Deprecated since 4.12.0, use HTTP management server instead.
    • 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.
    • isDownloadEnabled

      public boolean isDownloadEnabled()
    • setDownloadEnabled

      public void setDownloadEnabled(boolean downloadEnabled)
      Whether to enable file download via HTTP. This makes it possible to browse and download resource source files such as Camel XML or YAML routes. Only enable this for development, troubleshooting or special situations for management and monitoring.
    • isSendEnabled

      public boolean isSendEnabled()
    • setSendEnabled

      public void setSendEnabled(boolean sendEnabled)
      Whether to enable sending messages to Camel via HTTP. This makes it possible to use Camel to send messages to Camel endpoint URIs via HTTP.
    • isAuthenticationEnabled

      public boolean isAuthenticationEnabled()
    • setAuthenticationEnabled

      public void setAuthenticationEnabled(boolean authenticationEnabled)
      Whether to enable HTTP authentication for embedded server (for standalone applications; not Spring Boot or Quarkus).
    • getAuthenticationPath

      public String getAuthenticationPath()
    • setAuthenticationPath

      public void setAuthenticationPath(String authenticationPath)
      Set HTTP url path of embedded server that is protected by authentication configuration.
    • getBasicPropertiesFile

      public String getBasicPropertiesFile()
    • setBasicPropertiesFile

      public void setBasicPropertiesFile(String basicPropertiesFile)
      Name of the file that contains basic authentication info for Vert.x file auth provider.
    • getJwtKeystoreType

      public String getJwtKeystoreType()
    • setJwtKeystoreType

      public void setJwtKeystoreType(String jwtKeystoreType)
      Type of the keystore used for JWT tokens validation (jks, pkcs12, etc.).
    • getJwtKeystorePath

      public String getJwtKeystorePath()
    • setJwtKeystorePath

      public void setJwtKeystorePath(String jwtKeystorePath)
      Path to the keystore file used for JWT tokens validation.
    • getJwtKeystorePassword

      public String getJwtKeystorePassword()
    • setJwtKeystorePassword

      public void setJwtKeystorePassword(String jwtKeystorePassword)
      Password from the keystore used for JWT tokens validation.
    • 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.
    • withFileUploadEnabled

      public HttpServerConfigurationProperties withFileUploadEnabled(boolean fileUploadEnabled)
      Whether to enable file uploads being supported (such as POST multipart/form-data) and stored into a temporary directory.
    • withFileUploadDirectory

      public HttpServerConfigurationProperties withFileUploadDirectory(String fileUploadDirectory)
      Directory to temporary store file uploads while Camel routes the incoming request. If no directory has been explicit configured, then a temporary directory is created in the java.io.tmpdir directory.
    • withInfoEnabled

      public HttpServerConfigurationProperties withInfoEnabled(boolean infoEnabled)
      Whether to enable info console. If enabled then you can see some basic Camel information at /q/info
    • withStaticEnabled

      public HttpServerConfigurationProperties withStaticEnabled(boolean staticEnabled)
      Whether serving static files is enabled. If enabled then Camel can host html/js and other web files that makes it possible to include small web applications.
    • withStaticSourceDir

      public HttpServerConfigurationProperties withStaticSourceDir(String staticSourceDir)
      Additional directory that holds static content when static is enabled.
    • withStaticContextPath

      public HttpServerConfigurationProperties withStaticContextPath(String staticContextPath)
      The context-path to use for serving static content. By default, the root path is used. And if there is an index.html page then this is automatically loaded.
    • 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. Deprecated since 4.12.0, use HTTP management server instead.
    • 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 (default). Deprecated since 4.12.0, use HTTP management server instead.
    • withJolokiaEnabled

      public HttpServerConfigurationProperties withJolokiaEnabled(boolean jolokiaEnabled)
      Whether to enable jolokia. If enabled then you can access jolokia api on context-path: /q/jolokia. Deprecated since 4.12.0, use HTTP management server instead.
    • withMetricsEnabled

      public HttpServerConfigurationProperties withMetricsEnabled(boolean metricsEnabled)
      Whether to enable metrics. If enabled then you can access metrics on context-path: /q/metrics (default). Deprecated since 4.12.0, use HTTP management server instead.
    • 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.
    • withDownloadEnabled

      public HttpServerConfigurationProperties withDownloadEnabled(boolean downloadEnabled)
      Whether to enable file download via HTTP. This makes it possible to browse and download resource source files such as Camel XML or YAML routes. Only enable this for development, troubleshooting or special situations for management and monitoring.
    • withSendEnabled

      public HttpServerConfigurationProperties withSendEnabled(boolean sendEnabled)
      Whether to enable sending messages to Camel via HTTP. This makes it possible to use Camel to send messages to Camel endpoint URIs via HTTP.
    • withAuthenticationEnabled

      public HttpServerConfigurationProperties withAuthenticationEnabled(boolean authenticationEnabled)
      Whether to enable HTTP authentication for embedded server (for standalone applications; not Spring Boot or Quarkus).
    • withAuthenticationPath

      public HttpServerConfigurationProperties withAuthenticationPath(String authenticationPath)
      Set HTTP url path of embedded server that is protected by authentication configuration.
    • withBasicPropertiesFile

      public HttpServerConfigurationProperties withBasicPropertiesFile(String basicPropertiesFile)
      Name of the file that contains basic authentication info for Vert.x file auth provider.
    • withJwtKeystoreType

      public HttpServerConfigurationProperties withJwtKeystoreType(String jwtKeystoreType)
      Type of the keystore used for JWT tokens validation (jks, pkcs12, etc.).
    • withJwtKeystorePath

      public HttpServerConfigurationProperties withJwtKeystorePath(String jwtKeystorePath)
      Path to the keystore file used for JWT tokens validation.
    • withJwtKeystorePassword

      public HttpServerConfigurationProperties withJwtKeystorePassword(String jwtKeystorePassword)
      Password from the keystore used for JWT tokens validation.
    • withHealthPath

      public HttpServerConfigurationProperties withHealthPath(String healthPath)
      The path endpoint used to expose the health status
    • withJolokiaPath

      public HttpServerConfigurationProperties withJolokiaPath(String jolokiaPath)
      The path endpoint used to expose the jolokia data. Deprecated since 4.12.0, use HTTP management server instead.