Class MainHttpServer

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.component.platform.http.main.MainHttpServer
All Implemented Interfaces:
AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.NonManagedService, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasCamelContext, org.apache.camel.StatefulService, org.apache.camel.StaticService, org.apache.camel.SuspendableService

public class MainHttpServer extends org.apache.camel.support.service.ServiceSupport implements org.apache.camel.CamelContextAware, org.apache.camel.StaticService, org.apache.camel.NonManagedService
  • Field Summary

    Fields inherited from class org.apache.camel.support.service.BaseService

    BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    protected void
     
    org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfiguration.BodyHandler
     
    org.apache.camel.CamelContext
     
    org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfiguration
     
    org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfiguration.Cors
     
     
     
     
    int
     
    org.apache.camel.component.platform.http.vertx.VertxPlatformHttpRouter
     
    org.apache.camel.support.jsse.SSLContextParameters
     
    protected int
    getStatusCode(org.json.simple.JSONAware json)
     
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    void
    setBodyHandler(org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfiguration.BodyHandler bodyHandler)
     
    void
    setCamelContext(org.apache.camel.CamelContext camelContext)
     
    void
    setConfiguration(org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfiguration configuration)
     
    void
    setCors(org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfiguration.Cors corsConfiguration)
     
    void
    setDevConsoleEnabled(boolean devConsoleEnabled)
    Whether developer web console is enabled (q/dev)
    void
    setHealthCheckEnabled(boolean healthCheckEnabled)
    Whether health-check is enabled (q/health)
    void
     
    void
    setJolokiaEnabled(boolean jolokiaEnabledEnabled)
    Whether jolokia is enabled (q/jolokia)
    void
    setMaxBodySize(Long maxBodySize)
     
    void
    setMetricsEnabled(boolean metricsEnabled)
    Whether metrics is enabled (q/metrics)
    void
     
    void
    setPort(int port)
     
    void
    setSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters)
     
    protected void
     
    protected void
     
    protected void
     
    protected void
     
    void
    setUploadEnabled(boolean uploadEnabled)
    Whether file upload is enabled (only for development) (q/upload)
    void
    setUploadSourceDir(String uploadSourceDir)
    Directory for upload.
    protected void
     
    protected void
     
    void
    setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters)
     

    Methods inherited from class org.apache.camel.support.service.BaseService

    build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.camel.Service

    build, close, init, start, stop

    Methods inherited from interface org.apache.camel.ShutdownableService

    shutdown

    Methods inherited from interface org.apache.camel.StatefulService

    getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending

    Methods inherited from interface org.apache.camel.SuspendableService

    isSuspended, resume, suspend
  • Constructor Details

    • MainHttpServer

      public MainHttpServer()
  • Method Details

    • getCamelContext

      public org.apache.camel.CamelContext getCamelContext()
      Specified by:
      getCamelContext in interface org.apache.camel.spi.HasCamelContext
    • setCamelContext

      public void setCamelContext(org.apache.camel.CamelContext camelContext)
      Specified by:
      setCamelContext in interface org.apache.camel.CamelContextAware
    • getConfiguration

      public org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfiguration getConfiguration()
    • setConfiguration

      public void setConfiguration(org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfiguration configuration)
    • isDevConsoleEnabled

      public boolean isDevConsoleEnabled()
    • setDevConsoleEnabled

      public void setDevConsoleEnabled(boolean devConsoleEnabled)
      Whether developer web console is enabled (q/dev)
    • isHealthCheckEnabled

      public boolean isHealthCheckEnabled()
    • isJolokiaEnabled

      public boolean isJolokiaEnabled()
    • setHealthCheckEnabled

      public void setHealthCheckEnabled(boolean healthCheckEnabled)
      Whether health-check is enabled (q/health)
    • setJolokiaEnabled

      public void setJolokiaEnabled(boolean jolokiaEnabledEnabled)
      Whether jolokia is enabled (q/jolokia)
    • isMetricsEnabled

      public boolean isMetricsEnabled()
    • setMetricsEnabled

      public void setMetricsEnabled(boolean metricsEnabled)
      Whether metrics is enabled (q/metrics)
    • isUploadEnabled

      public boolean isUploadEnabled()
    • setUploadEnabled

      public void setUploadEnabled(boolean uploadEnabled)
      Whether file upload is enabled (only for development) (q/upload)
    • getUploadSourceDir

      public String getUploadSourceDir()
    • setUploadSourceDir

      public void setUploadSourceDir(String uploadSourceDir)
      Directory for upload.
    • getPort

      public int getPort()
    • setPort

      public void setPort(int port)
    • getHost

      public String getHost()
    • setHost

      public void setHost(String host)
    • getPath

      public String getPath()
    • setPath

      public void setPath(String path)
    • getMaxBodySize

      public Long getMaxBodySize()
    • setMaxBodySize

      public void setMaxBodySize(Long maxBodySize)
    • getSslContextParameters

      public org.apache.camel.support.jsse.SSLContextParameters getSslContextParameters()
    • setSslContextParameters

      public void setSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters)
    • isUseGlobalSslContextParameters

      public boolean isUseGlobalSslContextParameters()
    • setUseGlobalSslContextParameters

      public void setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters)
    • getCors

      public org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfiguration.Cors getCors()
    • setCors

      public void setCors(org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfiguration.Cors corsConfiguration)
    • getBodyHandler

      public org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfiguration.BodyHandler getBodyHandler()
    • setBodyHandler

      public void setBodyHandler(org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfiguration.BodyHandler bodyHandler)
    • getRouter

      public org.apache.camel.component.platform.http.vertx.VertxPlatformHttpRouter getRouter()
    • doStart

      protected void doStart() throws Exception
      Overrides:
      doStart in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • setupConsoles

      protected void setupConsoles()
    • setupStartupSummary

      protected void setupStartupSummary() throws Exception
      Throws:
      Exception
    • setupHealthCheckConsole

      protected void setupHealthCheckConsole()
    • setupJolokia

      protected void setupJolokia()
    • getStatusCode

      protected int getStatusCode(org.json.simple.JSONAware json)
    • doStop

      protected void doStop() throws Exception
      Overrides:
      doStop in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • setupDevConsole

      protected void setupDevConsole()
    • setupUploadConsole

      protected void setupUploadConsole(String dir)