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.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasCamelContext,org.apache.camel.StatefulService,org.apache.camel.StaticService,org.apache.camel.SuspendableService
@ManagedResource(description="Camel Main Embedded HTTP server")
public class MainHttpServer
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.CamelContextAware, org.apache.camel.StaticService
-
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoInit()protected voiddoSend(io.vertx.ext.web.RoutingContext ctx) protected voidprotected voiddoStart()org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfiguration.BodyHandlerorg.apache.camel.CamelContextorg.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfigurationorg.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfiguration.CorsgetCors()getHost()getPath()intgetPort()org.apache.camel.component.platform.http.vertx.VertxPlatformHttpRouterorg.apache.camel.support.jsse.SSLContextParametersbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanprotected org.apache.camel.component.platform.http.spi.PlatformHttpPluginRegistryvoidsetBodyHandler(org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfiguration.BodyHandler bodyHandler) voidsetCamelContext(org.apache.camel.CamelContext camelContext) voidsetConfiguration(org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfiguration configuration) voidsetCors(org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfiguration.Cors corsConfiguration) voidsetDevConsoleEnabled(boolean devConsoleEnabled) Whether developer web console is enabled (q/dev)voidsetDownloadEnabled(boolean downloadEnabled) Whether file download is enabled (q/download)voidsetHealthCheckEnabled(boolean healthCheckEnabled) Whether health-check is enabled (q/health)voidvoidsetInfoEnabled(boolean infoEnabled) voidsetJolokiaEnabled(boolean jolokiaEnabledEnabled) Whether jolokia is enabled (q/jolokia)voidsetMaxBodySize(Long maxBodySize) voidsetMetricsEnabled(boolean metricsEnabled) Whether metrics is enabled (q/metrics)voidvoidsetPort(int port) voidsetSendEnabled(boolean sendEnabled) Whether to enable sending messages to Camel via HTTP.voidsetSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters) voidsetStaticContextPath(String staticContextPath) voidsetStaticEnabled(boolean staticEnabled) protected voidprotected voidprotected voidprotected voidprotected voidprotected voidvoidsetUploadEnabled(boolean uploadEnabled) Whether file upload is enabled (only for development) (q/upload)voidsetUploadSourceDir(String uploadSourceDir) Directory for upload.protected voidprotected voidprotected voidprotected voidsetupUploadConsole(String dir) voidsetUseGlobalSslContextParameters(boolean useGlobalSslContextParameters) Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doStop, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods 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:
getCamelContextin interfaceorg.apache.camel.spi.HasCamelContext
-
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext) - Specified by:
setCamelContextin interfaceorg.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) -
isInfoEnabled
@ManagedAttribute(description="Whether info is enabled (/q/info)") public boolean isInfoEnabled() -
setInfoEnabled
public void setInfoEnabled(boolean infoEnabled) -
isStaticEnabled
@ManagedAttribute(description="Whether serving static content is enabled (such as html pages)") public boolean isStaticEnabled() -
setStaticEnabled
public void setStaticEnabled(boolean staticEnabled) -
getStaticContextPath
@ManagedAttribute(description="The context-path for serving static content") public String getStaticContextPath() -
setStaticContextPath
-
isStaticFilePattern
@ManagedAttribute(description="Whether serving static content is enabled (such as html pages)") public boolean isStaticFilePattern() -
isDevConsoleEnabled
@ManagedAttribute(description="Whether dev console is enabled (/q/dev)") public boolean isDevConsoleEnabled() -
setDevConsoleEnabled
public void setDevConsoleEnabled(boolean devConsoleEnabled) Whether developer web console is enabled (q/dev) -
isHealthCheckEnabled
@ManagedAttribute(description="Whether health check is enabled (q/health)") public boolean isHealthCheckEnabled() -
isJolokiaEnabled
@ManagedAttribute(description="Whether Jolokia is enabled (q/jolokia)") 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
@ManagedAttribute(description="Whether metrics is enabled (q/metric)") public boolean isMetricsEnabled() -
setMetricsEnabled
public void setMetricsEnabled(boolean metricsEnabled) Whether metrics is enabled (q/metrics) -
isUploadEnabled
@ManagedAttribute(description="Whether file upload is enabled (only for development) (q/upload)") public boolean isUploadEnabled() -
setUploadEnabled
public void setUploadEnabled(boolean uploadEnabled) Whether file upload is enabled (only for development) (q/upload) -
getUploadSourceDir
-
setUploadSourceDir
Directory for upload. -
isDownloadEnabled
@ManagedAttribute(description="Whether file download is enabled (q/download)") public boolean isDownloadEnabled() -
setDownloadEnabled
public void setDownloadEnabled(boolean downloadEnabled) Whether file download is enabled (q/download) -
isSendEnabled
@ManagedAttribute(description="Whether send message is enabled (q/send)") 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. -
getPort
@ManagedAttribute(description="HTTP server port number") public int getPort() -
setPort
public void setPort(int port) -
getHost
-
setHost
-
getPath
-
setPath
-
getMaxBodySize
-
setMaxBodySize
-
getSslContextParameters
public org.apache.camel.support.jsse.SSLContextParameters getSslContextParameters() -
setSslContextParameters
public void setSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters) -
isUseGlobalSslContextParameters
@ManagedAttribute(description="HTTP server using global SSL context parameters") 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() -
doInit
- Overrides:
doInitin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
doStart
- Overrides:
doStartin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
doShutdown
- Overrides:
doShutdownin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
setupConsoles
protected void setupConsoles() -
setupStartupSummary
- Throws:
Exception
-
setupStatic
protected void setupStatic() -
setupInfo
protected void setupInfo() -
setupHealthCheckConsole
protected void setupHealthCheckConsole() -
setupJolokia
protected void setupJolokia() -
resolvePlatformHttpPluginRegistry
protected org.apache.camel.component.platform.http.spi.PlatformHttpPluginRegistry resolvePlatformHttpPluginRegistry() -
setupDevConsole
protected void setupDevConsole() -
setupUploadConsole
-
setupDownloadConsole
protected void setupDownloadConsole() -
setupSendConsole
protected void setupSendConsole() -
doSend
protected void doSend(io.vertx.ext.web.RoutingContext ctx)
-