Package org.apache.camel.component.jetty
Class JettyHttpComponent
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.DefaultComponent
-
- org.apache.camel.support.HeaderFilterStrategyComponent
-
- org.apache.camel.http.common.HttpCommonComponent
-
- org.apache.camel.component.jetty.JettyHttpComponent
-
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,org.apache.camel.Component,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HeaderFilterStrategyAware,org.apache.camel.spi.RestApiConsumerFactory,org.apache.camel.spi.RestConsumerFactory,org.apache.camel.SSLContextParametersAware,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
public abstract class JettyHttpComponent extends org.apache.camel.http.common.HttpCommonComponent implements org.apache.camel.spi.RestConsumerFactory, org.apache.camel.spi.RestApiConsumerFactory, org.apache.camel.SSLContextParametersAwareAn HttpComponent which starts an embedded Jetty for to handle consuming from the http endpoints.
-
-
Field Summary
Fields Modifier and Type Field Description protected static HashMap<String,org.apache.camel.component.jetty.JettyHttpComponent.ConnectorRef>CONNECTORSprotected LongcontinuationTimeoutprotected booleanenableJmxprotected org.eclipse.jetty.server.handler.ErrorHandlererrorHandlerprotected JettyHttpBindingjettyHttpBindingprotected IntegermaxThreadsprotected org.eclipse.jetty.jmx.MBeanContainermbContainerprotected IntegerminThreadsprotected StringproxyHostprotected IntegerrequestBufferSizeprotected IntegerrequestHeaderSizeprotected IntegerresponseBufferSizeprotected IntegerresponseHeaderSizeprotected Map<String,Object>socketConnectorPropertiesprotected Map<Integer,org.eclipse.jetty.server.Connector>socketConnectorsprotected org.apache.camel.support.jsse.SSLContextParameterssslContextParametersprotected StringsslKeyPasswordprotected StringsslKeystoreprotected StringsslPasswordprotected Map<String,Object>sslSocketConnectorPropertiesprotected Map<Integer,org.eclipse.jetty.server.Connector>sslSocketConnectorsprotected org.eclipse.jetty.util.thread.ThreadPoolthreadPoolstatic StringTMP_DIRprotected booleanuseContinuationprotected booleanuseGlobalSslContextParametersprotected booleanuseXForwardedForHeader
-
Constructor Summary
Constructors Constructor Description JettyHttpComponent()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddJettyHandlers(org.eclipse.jetty.server.Server server, List<org.eclipse.jetty.server.Handler> handlers)voidaddSocketConnectorProperty(String key, Object value)voidaddSslSocketConnectorProperty(String key, Object value)booleancanConnect(org.apache.camel.http.common.HttpConsumer consumer)protected booleancheckSSLContextFactoryConfig(Object instance)voidconnect(org.apache.camel.http.common.HttpConsumer consumer)Connects the URL specified on the endpoint to the specified processor.org.apache.camel.ConsumercreateApiConsumer(org.apache.camel.CamelContext camelContext, org.apache.camel.Processor processor, String contextPath, org.apache.camel.spi.RestConfiguration configuration, Map<String,Object> parameters)protected org.eclipse.jetty.server.ConnectorcreateConnector(org.eclipse.jetty.server.Server server, JettyHttpEndpoint endpoint)protected abstract org.eclipse.jetty.server.AbstractConnectorcreateConnectorJettyInternal(org.eclipse.jetty.server.Server server, JettyHttpEndpoint endpoint, org.eclipse.jetty.util.ssl.SslContextFactory sslcf)org.apache.camel.ConsumercreateConsumer(org.apache.camel.CamelContext camelContext, org.apache.camel.Processor processor, String verb, String basePath, String uriTemplate, String consumes, String produces, org.apache.camel.spi.RestConfiguration configuration, Map<String,Object> parameters)protected org.apache.camel.EndpointcreateEndpoint(String uri, String remaining, Map<String,Object> parameters)protected abstract JettyHttpEndpointcreateEndpoint(URI endpointUri, URI httpUri)protected org.eclipse.jetty.server.ServercreateServer()protected org.apache.camel.http.common.CamelServletcreateServletForConnector(org.eclipse.jetty.server.Server server, org.eclipse.jetty.server.Connector connector, List<org.eclipse.jetty.server.Handler> handlers, JettyHttpEndpoint endpoint)voiddisconnect(org.apache.camel.http.common.HttpConsumer consumer)Disconnects the URL specified on the endpoint from the specified processor.protected voiddoInit()protected voiddoStop()protected org.eclipse.jetty.server.ConnectorgetConnector(org.eclipse.jetty.server.Server server, JettyHttpEndpoint endpoint)LonggetContinuationTimeout()org.eclipse.jetty.server.handler.ErrorHandlergetErrorHandler()JettyHttpBindinggetJettyHttpBinding()StringgetKeystore()IntegergetMaxThreads()org.eclipse.jetty.jmx.MBeanContainergetMbContainer()IntegergetMinThreads()StringgetProxyHost()IntegergetProxyPort()IntegergetRequestBufferSize()IntegergetRequestHeaderSize()IntegergetResponseBufferSize()IntegergetResponseHeaderSize()protected org.eclipse.jetty.server.ConnectorgetSocketConnector(org.eclipse.jetty.server.Server server, JettyHttpEndpoint endpoint)Map<String,Object>getSocketConnectorProperties()Map<Integer,org.eclipse.jetty.server.Connector>getSocketConnectors()org.apache.camel.support.jsse.SSLContextParametersgetSslContextParameters()StringgetSslKeyPassword()StringgetSslPassword()protected org.eclipse.jetty.server.ConnectorgetSslSocketConnector(org.eclipse.jetty.server.Server server, JettyHttpEndpoint endpoint)Map<String,Object>getSslSocketConnectorProperties()Map<Integer,org.eclipse.jetty.server.Connector>getSslSocketConnectors()org.eclipse.jetty.util.thread.ThreadPoolgetThreadPool()booleanisEnableJmx()protected booleanisHandlerInChain(org.eclipse.jetty.server.Handler current, org.eclipse.jetty.server.Handler handler)booleanisSendServerVersion()booleanisUseContinuation()booleanisUseGlobalSslContextParameters()booleanisUseXForwardedForHeader()voidsetContinuationTimeout(Long continuationTimeout)Allows to set a timeout in millis when using Jetty as consumer (server).voidsetEnableJmx(boolean enableJmx)If this option is true, Jetty JMX support will be enabled for this endpoint.voidsetErrorHandler(org.eclipse.jetty.server.handler.ErrorHandler errorHandler)This option is used to set the ErrorHandler that Jetty server uses.voidsetHttpBinding(org.apache.camel.http.common.HttpBinding httpBinding)Not to be used - use JettyHttpBinding instead.voidsetHttpConfiguration(org.apache.camel.http.common.HttpConfiguration httpConfiguration)Jetty component does not use HttpConfiguration.voidsetJettyHttpBinding(JettyHttpBinding jettyHttpBinding)To use a custom org.apache.camel.component.jetty.JettyHttpBinding, which are used to customize how a response should be written for the producer.voidsetKeystore(String sslKeystore)Specifies the location of the Java keystore file, which contains the Jetty server's own X.509 certificate in a key entry.voidsetMaxThreads(Integer maxThreads)To set a value for maximum number of threads in server thread pool.voidsetMbContainer(org.eclipse.jetty.jmx.MBeanContainer mbContainer)To use a existing configured org.eclipse.jetty.jmx.MBeanContainer if JMX is enabled that Jetty uses for registering mbeans.voidsetMinThreads(Integer minThreads)To set a value for minimum number of threads in server thread pool.voidsetProxyHost(String proxyHost)To use a http proxy to configure the hostname.voidsetProxyPort(Integer proxyPort)To use a http proxy to configure the port number.voidsetRequestBufferSize(Integer requestBufferSize)Allows to configure a custom value of the request buffer size on the Jetty connectors.voidsetRequestHeaderSize(Integer requestHeaderSize)Allows to configure a custom value of the request header size on the Jetty connectors.voidsetResponseBufferSize(Integer responseBufferSize)Allows to configure a custom value of the response buffer size on the Jetty connectors.voidsetResponseHeaderSize(Integer responseHeaderSize)Allows to configure a custom value of the response header size on the Jetty connectors.voidsetSendServerVersion(boolean sendServerVersion)If the option is true, jetty will send the server header with the jetty version information to the client which sends the request.voidsetSocketConnectorProperties(Map<String,Object> socketConnectorProperties)A map which contains general HTTP connector properties.voidsetSocketConnectors(Map<Integer,org.eclipse.jetty.server.Connector> socketConnectors)A map which contains per port number specific HTTP connectors.voidsetSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters)To configure security using SSLContextParametersvoidsetSslKeyPassword(String sslKeyPassword)The key password, which is used to access the certificate's key entry in the keystore (this is the same password that is supplied to the keystore command's -keypass option).voidsetSslPassword(String sslPassword)The ssl password, which is required to access the keystore file (this is the same password that is supplied to the keystore command's -storepass option).voidsetSslSocketConnectorProperties(Map<String,Object> sslSocketConnectorProperties)A map which contains general SSL connector properties.voidsetSslSocketConnectors(Map<Integer,org.eclipse.jetty.server.Connector> connectors)A map which contains per port number specific SSL connectors.voidsetThreadPool(org.eclipse.jetty.util.thread.ThreadPool threadPool)To use a custom thread pool for the server.voidsetUseContinuation(boolean useContinuation)Whether or not to use Jetty continuations for the Jetty Server.voidsetUseGlobalSslContextParameters(boolean useGlobalSslContextParameters)Enable usage of global SSL context parametersvoidsetUseXForwardedForHeader(boolean useXForwardedForHeader)To use the X-Forwarded-For header in HttpServletRequest.getRemoteAddr.-
Methods inherited from class org.apache.camel.http.common.HttpCommonComponent
getHttpBinding, getHttpConfiguration, getParameter, getParameter, isAllowJavaSerializedObject, isMuteException, setAllowJavaSerializedObject, setMuteException, useIntrospectionOnEndpoint
-
Methods inherited from class org.apache.camel.support.HeaderFilterStrategyComponent
getHeaderFilterStrategy, setEndpointHeaderFilterStrategy, setHeaderFilterStrategy
-
Methods inherited from class org.apache.camel.support.DefaultComponent
afterConfiguration, createEndpoint, createEndpoint, doBuild, doStart, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getComponentPropertyConfigurer, getDefaultName, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, resolveRawParameterValues, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setLazyStartProducer, setProperties, setProperties, setProperties, useRawUri, validateParameters, validateURI
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doFail, 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.CamelContextAware
getCamelContext, setCamelContext
-
Methods inherited from interface org.apache.camel.SSLContextParametersAware
retrieveGlobalSslContextParameters
-
-
-
-
Field Detail
-
TMP_DIR
public static final String TMP_DIR
- See Also:
- Constant Field Values
-
CONNECTORS
protected static final HashMap<String,org.apache.camel.component.jetty.JettyHttpComponent.ConnectorRef> CONNECTORS
-
sslKeyPassword
protected String sslKeyPassword
-
sslPassword
protected String sslPassword
-
sslKeystore
protected String sslKeystore
-
minThreads
protected Integer minThreads
-
maxThreads
protected Integer maxThreads
-
threadPool
protected org.eclipse.jetty.util.thread.ThreadPool threadPool
-
mbContainer
protected org.eclipse.jetty.jmx.MBeanContainer mbContainer
-
enableJmx
protected boolean enableJmx
-
jettyHttpBinding
protected JettyHttpBinding jettyHttpBinding
-
continuationTimeout
protected Long continuationTimeout
-
useContinuation
protected boolean useContinuation
-
sslContextParameters
protected org.apache.camel.support.jsse.SSLContextParameters sslContextParameters
-
useGlobalSslContextParameters
protected boolean useGlobalSslContextParameters
-
requestBufferSize
protected Integer requestBufferSize
-
requestHeaderSize
protected Integer requestHeaderSize
-
responseBufferSize
protected Integer responseBufferSize
-
responseHeaderSize
protected Integer responseHeaderSize
-
proxyHost
protected String proxyHost
-
errorHandler
protected org.eclipse.jetty.server.handler.ErrorHandler errorHandler
-
useXForwardedForHeader
protected boolean useXForwardedForHeader
-
-
Method Detail
-
createEndpoint
protected org.apache.camel.Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
- Specified by:
createEndpointin classorg.apache.camel.support.DefaultComponent- Throws:
Exception
-
createEndpoint
protected abstract JettyHttpEndpoint createEndpoint(URI endpointUri, URI httpUri) throws URISyntaxException
- Throws:
URISyntaxException
-
canConnect
public boolean canConnect(org.apache.camel.http.common.HttpConsumer consumer) throws Exception- Overrides:
canConnectin classorg.apache.camel.http.common.HttpCommonComponent- Throws:
Exception
-
connect
public void connect(org.apache.camel.http.common.HttpConsumer consumer) throws ExceptionConnects the URL specified on the endpoint to the specified processor.- Overrides:
connectin classorg.apache.camel.http.common.HttpCommonComponent- Throws:
Exception
-
disconnect
public void disconnect(org.apache.camel.http.common.HttpConsumer consumer) throws ExceptionDisconnects the URL specified on the endpoint from the specified processor.- Overrides:
disconnectin classorg.apache.camel.http.common.HttpCommonComponent- Throws:
Exception
-
getSslKeyPassword
public String getSslKeyPassword()
-
setSslKeyPassword
@Metadata(description="The key password, which is used to access the certificate\'s key entry in the keystore (this is the same password that is supplied to the keystore command\'s -keypass option).", label="security", secret=true) public void setSslKeyPassword(String sslKeyPassword)The key password, which is used to access the certificate's key entry in the keystore (this is the same password that is supplied to the keystore command's -keypass option).
-
getSslPassword
public String getSslPassword()
-
setSslPassword
@Metadata(description="The ssl password, which is required to access the keystore file (this is the same password that is supplied to the keystore command\'s -storepass option).", label="security", secret=true) public void setSslPassword(String sslPassword)The ssl password, which is required to access the keystore file (this is the same password that is supplied to the keystore command's -storepass option).
-
setKeystore
@Metadata(description="Specifies the location of the Java keystore file, which contains the Jetty server\'s own X.509 certificate in a key entry.", label="security", secret=true) public void setKeystore(String sslKeystore)Specifies the location of the Java keystore file, which contains the Jetty server's own X.509 certificate in a key entry.
-
getKeystore
public String getKeystore()
-
getErrorHandler
public org.eclipse.jetty.server.handler.ErrorHandler getErrorHandler()
-
setErrorHandler
@Metadata(description="This option is used to set the ErrorHandler that Jetty server uses.", label="advanced") public void setErrorHandler(org.eclipse.jetty.server.handler.ErrorHandler errorHandler)This option is used to set the ErrorHandler that Jetty server uses.
-
getConnector
protected org.eclipse.jetty.server.Connector getConnector(org.eclipse.jetty.server.Server server, JettyHttpEndpoint endpoint)
-
getSocketConnector
protected org.eclipse.jetty.server.Connector getSocketConnector(org.eclipse.jetty.server.Server server, JettyHttpEndpoint endpoint)
-
getSslSocketConnector
protected org.eclipse.jetty.server.Connector getSslSocketConnector(org.eclipse.jetty.server.Server server, JettyHttpEndpoint endpoint)
-
createConnector
protected org.eclipse.jetty.server.Connector createConnector(org.eclipse.jetty.server.Server server, JettyHttpEndpoint endpoint)
-
createConnectorJettyInternal
protected abstract org.eclipse.jetty.server.AbstractConnector createConnectorJettyInternal(org.eclipse.jetty.server.Server server, JettyHttpEndpoint endpoint, org.eclipse.jetty.util.ssl.SslContextFactory sslcf)
-
checkSSLContextFactoryConfig
protected boolean checkSSLContextFactoryConfig(Object instance)
-
getSslSocketConnectors
public Map<Integer,org.eclipse.jetty.server.Connector> getSslSocketConnectors()
-
setSslSocketConnectors
@Metadata(description="A map which contains per port number specific SSL connectors.", label="security") public void setSslSocketConnectors(Map<Integer,org.eclipse.jetty.server.Connector> connectors)A map which contains per port number specific SSL connectors.
-
setSocketConnectors
@Metadata(description="A map which contains per port number specific HTTP connectors. Uses the same principle as sslSocketConnectors.", label="security") public void setSocketConnectors(Map<Integer,org.eclipse.jetty.server.Connector> socketConnectors)A map which contains per port number specific HTTP connectors. Uses the same principle as sslSocketConnectors.
-
getMinThreads
public Integer getMinThreads()
-
setMinThreads
@Metadata(description="To set a value for minimum number of threads in server thread pool. Notice that both a min and max size must be configured.", label="consumer") public void setMinThreads(Integer minThreads)To set a value for minimum number of threads in server thread pool. Notice that both a min and max size must be configured.
-
getMaxThreads
public Integer getMaxThreads()
-
setMaxThreads
@Metadata(description="To set a value for maximum number of threads in server thread pool. Notice that both a min and max size must be configured.", label="consumer") public void setMaxThreads(Integer maxThreads)To set a value for maximum number of threads in server thread pool. Notice that both a min and max size must be configured.
-
getThreadPool
public org.eclipse.jetty.util.thread.ThreadPool getThreadPool()
-
setThreadPool
@Metadata(description="To use a custom thread pool for the server. This option should only be used in special circumstances.", label="consumer,advanced") public void setThreadPool(org.eclipse.jetty.util.thread.ThreadPool threadPool)To use a custom thread pool for the server. This option should only be used in special circumstances.
-
isEnableJmx
public boolean isEnableJmx()
-
setEnableJmx
@Metadata(description="If this option is true, Jetty JMX support will be enabled for this endpoint.") public void setEnableJmx(boolean enableJmx)
If this option is true, Jetty JMX support will be enabled for this endpoint.
-
getJettyHttpBinding
public JettyHttpBinding getJettyHttpBinding()
-
setJettyHttpBinding
@Metadata(description="To use a custom org.apache.camel.component.jetty.JettyHttpBinding, which are used to customize how a response should be written for the producer.", label="advanced") public void setJettyHttpBinding(JettyHttpBinding jettyHttpBinding)To use a custom org.apache.camel.component.jetty.JettyHttpBinding, which are used to customize how a response should be written for the producer.
-
setHttpBinding
@Metadata(description="Not to be used - use JettyHttpBinding instead.", label="advanced") public void setHttpBinding(org.apache.camel.http.common.HttpBinding httpBinding)Not to be used - use JettyHttpBinding instead.- Overrides:
setHttpBindingin classorg.apache.camel.http.common.HttpCommonComponent
-
setHttpConfiguration
@Metadata(description="Jetty component does not use HttpConfiguration.", label="advanced") public void setHttpConfiguration(org.apache.camel.http.common.HttpConfiguration httpConfiguration)Jetty component does not use HttpConfiguration.- Overrides:
setHttpConfigurationin classorg.apache.camel.http.common.HttpCommonComponent
-
getMbContainer
public org.eclipse.jetty.jmx.MBeanContainer getMbContainer()
-
setMbContainer
@Metadata(description="To use a existing configured org.eclipse.jetty.jmx.MBeanContainer if JMX is enabled that Jetty uses for registering mbeans.", label="advanced") public void setMbContainer(org.eclipse.jetty.jmx.MBeanContainer mbContainer)To use a existing configured org.eclipse.jetty.jmx.MBeanContainer if JMX is enabled that Jetty uses for registering mbeans.
-
setSslSocketConnectorProperties
@Metadata(description="A map which contains general SSL connector properties.", label="security") public void setSslSocketConnectorProperties(Map<String,Object> sslSocketConnectorProperties)A map which contains general SSL connector properties.
-
setSocketConnectorProperties
@Metadata(description="A map which contains general HTTP connector properties. Uses the same principle as sslSocketConnectorProperties.", label="security") public void setSocketConnectorProperties(Map<String,Object> socketConnectorProperties)A map which contains general HTTP connector properties. Uses the same principle as sslSocketConnectorProperties.
-
getContinuationTimeout
public Long getContinuationTimeout()
-
setContinuationTimeout
@Metadata(description="Allows to set a timeout in millis when using Jetty as consumer (server). By default Jetty uses 30000. You can use a value of <= 0 to never expire. If a timeout occurs then the request will be expired and Jetty will return back a http error 503 to the client. This option is only in use when using Jetty with the Asynchronous Routing Engine.", defaultValue="30000", label="consumer") public void setContinuationTimeout(Long continuationTimeout)Allows to set a timeout in millis when using Jetty as consumer (server). By default Jetty uses 30000. You can use a value of <= 0 to never expire. If a timeout occurs then the request will be expired and Jetty will return back a http error 503 to the client. This option is only in use when using Jetty with the Asynchronous Routing Engine.
-
isUseContinuation
public boolean isUseContinuation()
-
setUseContinuation
@Metadata(description="Whether or not to use Jetty continuations for the Jetty Server.", defaultValue="true", label="consumer") public void setUseContinuation(boolean useContinuation)Whether or not to use Jetty continuations for the Jetty Server.
-
getSslContextParameters
public org.apache.camel.support.jsse.SSLContextParameters getSslContextParameters()
-
setSslContextParameters
@Metadata(description="To configure security using SSLContextParameters", label="security") public void setSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters)To configure security using SSLContextParameters
-
isUseGlobalSslContextParameters
public boolean isUseGlobalSslContextParameters()
- Specified by:
isUseGlobalSslContextParametersin interfaceorg.apache.camel.SSLContextParametersAware
-
setUseGlobalSslContextParameters
@Metadata(description="Enable usage of global SSL context parameters", label="security", defaultValue="false") public void setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters)Enable usage of global SSL context parameters- Specified by:
setUseGlobalSslContextParametersin interfaceorg.apache.camel.SSLContextParametersAware
-
getResponseBufferSize
public Integer getResponseBufferSize()
-
setResponseBufferSize
@Metadata(description="Allows to configure a custom value of the response buffer size on the Jetty connectors.") public void setResponseBufferSize(Integer responseBufferSize)
Allows to configure a custom value of the response buffer size on the Jetty connectors.
-
getRequestBufferSize
public Integer getRequestBufferSize()
-
setRequestBufferSize
@Metadata(description="Allows to configure a custom value of the request buffer size on the Jetty connectors.") public void setRequestBufferSize(Integer requestBufferSize)
Allows to configure a custom value of the request buffer size on the Jetty connectors.
-
getRequestHeaderSize
public Integer getRequestHeaderSize()
-
setRequestHeaderSize
@Metadata(description="Allows to configure a custom value of the request header size on the Jetty connectors.") public void setRequestHeaderSize(Integer requestHeaderSize)
Allows to configure a custom value of the request header size on the Jetty connectors.
-
getResponseHeaderSize
public Integer getResponseHeaderSize()
-
setResponseHeaderSize
@Metadata(description="Allows to configure a custom value of the response header size on the Jetty connectors.") public void setResponseHeaderSize(Integer responseHeaderSize)
Allows to configure a custom value of the response header size on the Jetty connectors.
-
getProxyHost
public String getProxyHost()
-
setProxyHost
@Metadata(description="To use a http proxy to configure the hostname.", label="proxy") public void setProxyHost(String proxyHost)To use a http proxy to configure the hostname.
-
getProxyPort
public Integer getProxyPort()
-
setProxyPort
@Metadata(description="To use a http proxy to configure the port number.", label="proxy") public void setProxyPort(Integer proxyPort)To use a http proxy to configure the port number.
-
isUseXForwardedForHeader
public boolean isUseXForwardedForHeader()
-
setUseXForwardedForHeader
@Metadata(description="To use the X-Forwarded-For header in HttpServletRequest.getRemoteAddr.") public void setUseXForwardedForHeader(boolean useXForwardedForHeader)
To use the X-Forwarded-For header in HttpServletRequest.getRemoteAddr.
-
isSendServerVersion
public boolean isSendServerVersion()
-
setSendServerVersion
@Metadata(description="If the option is true, jetty will send the server header with the jetty version information to the client which sends the request. NOTE please make sure there is no any other camel-jetty endpoint is share the same port, otherwise this option may not work as expected.", defaultValue="true", label="consumer") public void setSendServerVersion(boolean sendServerVersion)If the option is true, jetty will send the server header with the jetty version information to the client which sends the request. NOTE please make sure there is no any other camel-jetty endpoint is share the same port, otherwise this option may not work as expected.
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.CamelContext camelContext, org.apache.camel.Processor processor, String verb, String basePath, String uriTemplate, String consumes, String produces, org.apache.camel.spi.RestConfiguration configuration, Map<String,Object> parameters) throws Exception- Specified by:
createConsumerin interfaceorg.apache.camel.spi.RestConsumerFactory- Throws:
Exception
-
createApiConsumer
public org.apache.camel.Consumer createApiConsumer(org.apache.camel.CamelContext camelContext, org.apache.camel.Processor processor, String contextPath, org.apache.camel.spi.RestConfiguration configuration, Map<String,Object> parameters) throws Exception- Specified by:
createApiConsumerin interfaceorg.apache.camel.spi.RestApiConsumerFactory- Throws:
Exception
-
createServletForConnector
protected org.apache.camel.http.common.CamelServlet createServletForConnector(org.eclipse.jetty.server.Server server, org.eclipse.jetty.server.Connector connector, List<org.eclipse.jetty.server.Handler> handlers, JettyHttpEndpoint endpoint) throws Exception- Throws:
Exception
-
addJettyHandlers
protected void addJettyHandlers(org.eclipse.jetty.server.Server server, List<org.eclipse.jetty.server.Handler> handlers)
-
isHandlerInChain
protected boolean isHandlerInChain(org.eclipse.jetty.server.Handler current, org.eclipse.jetty.server.Handler handler)
-
createServer
protected org.eclipse.jetty.server.Server createServer()
-
doInit
protected void doInit() throws Exception- Overrides:
doInitin classorg.apache.camel.support.DefaultComponent- Throws:
Exception
-
-