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.SSLContextParametersAware
An 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>
CONNECTORS
protected Long
continuationTimeout
protected boolean
enableJmx
protected org.eclipse.jetty.server.handler.ErrorHandler
errorHandler
protected JettyHttpBinding
jettyHttpBinding
protected Integer
maxThreads
protected org.eclipse.jetty.jmx.MBeanContainer
mbContainer
protected Integer
minThreads
protected String
proxyHost
protected Integer
requestBufferSize
protected Integer
requestHeaderSize
protected Integer
responseBufferSize
protected Integer
responseHeaderSize
protected Map<String,Object>
socketConnectorProperties
protected Map<Integer,org.eclipse.jetty.server.Connector>
socketConnectors
protected org.apache.camel.support.jsse.SSLContextParameters
sslContextParameters
protected String
sslKeyPassword
protected String
sslKeystore
protected String
sslPassword
protected Map<String,Object>
sslSocketConnectorProperties
protected Map<Integer,org.eclipse.jetty.server.Connector>
sslSocketConnectors
protected org.eclipse.jetty.util.thread.ThreadPool
threadPool
static String
TMP_DIR
protected boolean
useContinuation
protected boolean
useGlobalSslContextParameters
protected boolean
useXForwardedForHeader
-
Constructor Summary
Constructors Constructor Description JettyHttpComponent()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addJettyHandlers(org.eclipse.jetty.server.Server server, List<org.eclipse.jetty.server.Handler> handlers)
void
addSocketConnectorProperty(String key, Object value)
void
addSslSocketConnectorProperty(String key, Object value)
boolean
canConnect(org.apache.camel.http.common.HttpConsumer consumer)
protected boolean
checkSSLContextFactoryConfig(Object instance)
void
connect(org.apache.camel.http.common.HttpConsumer consumer)
Connects the URL specified on the endpoint to the specified processor.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)
protected org.eclipse.jetty.server.Connector
createConnector(org.eclipse.jetty.server.Server server, JettyHttpEndpoint endpoint)
protected abstract org.eclipse.jetty.server.AbstractConnector
createConnectorJettyInternal(org.eclipse.jetty.server.Server server, JettyHttpEndpoint endpoint, org.eclipse.jetty.util.ssl.SslContextFactory sslcf)
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)
protected org.apache.camel.Endpoint
createEndpoint(String uri, String remaining, Map<String,Object> parameters)
protected abstract JettyHttpEndpoint
createEndpoint(URI endpointUri, URI httpUri)
protected org.eclipse.jetty.server.Server
createServer()
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)
void
disconnect(org.apache.camel.http.common.HttpConsumer consumer)
Disconnects the URL specified on the endpoint from the specified processor.protected void
doInit()
protected void
doStop()
protected org.eclipse.jetty.server.Connector
getConnector(org.eclipse.jetty.server.Server server, JettyHttpEndpoint endpoint)
Long
getContinuationTimeout()
org.eclipse.jetty.server.handler.ErrorHandler
getErrorHandler()
int
getFileSizeThreshold()
String
getFilesLocation()
JettyHttpBinding
getJettyHttpBinding()
String
getKeystore()
long
getMaxFileSize()
long
getMaxRequestSize()
Integer
getMaxThreads()
org.eclipse.jetty.jmx.MBeanContainer
getMbContainer()
Integer
getMinThreads()
String
getProxyHost()
Integer
getProxyPort()
Integer
getRequestBufferSize()
Integer
getRequestHeaderSize()
Integer
getResponseBufferSize()
Integer
getResponseHeaderSize()
protected org.eclipse.jetty.server.Connector
getSocketConnector(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.SSLContextParameters
getSslContextParameters()
String
getSslKeyPassword()
String
getSslPassword()
protected org.eclipse.jetty.server.Connector
getSslSocketConnector(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.ThreadPool
getThreadPool()
boolean
isEnableJmx()
protected boolean
isHandlerInChain(org.eclipse.jetty.server.Handler current, org.eclipse.jetty.server.Handler handler)
boolean
isSendServerVersion()
boolean
isUseContinuation()
boolean
isUseGlobalSslContextParameters()
boolean
isUseXForwardedForHeader()
void
setContinuationTimeout(Long continuationTimeout)
Allows to set a timeout in millis when using Jetty as consumer (server).void
setEnableJmx(boolean enableJmx)
If this option is true, Jetty JMX support will be enabled for this endpoint.void
setErrorHandler(org.eclipse.jetty.server.handler.ErrorHandler errorHandler)
This option is used to set the ErrorHandler that Jetty server uses.void
setFileSizeThreshold(int fileSizeThreshold)
void
setFilesLocation(String filesLocation)
void
setHttpBinding(org.apache.camel.http.common.HttpBinding httpBinding)
Not to be used - use JettyHttpBinding instead.void
setHttpConfiguration(org.apache.camel.http.common.HttpConfiguration httpConfiguration)
Jetty component does not use HttpConfiguration.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.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.void
setMaxFileSize(long maxFileSize)
void
setMaxRequestSize(long maxRequestSize)
void
setMaxThreads(Integer maxThreads)
To set a value for maximum number of threads in server thread pool.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.void
setMinThreads(Integer minThreads)
To set a value for minimum number of threads in server thread pool.void
setProxyHost(String proxyHost)
To use a http proxy to configure the hostname.void
setProxyPort(Integer proxyPort)
To use a http proxy to configure the port number.void
setRequestBufferSize(Integer requestBufferSize)
Allows to configure a custom value of the request buffer size on the Jetty connectors.void
setRequestHeaderSize(Integer requestHeaderSize)
Allows to configure a custom value of the request header size on the Jetty connectors.void
setResponseBufferSize(Integer responseBufferSize)
Allows to configure a custom value of the response buffer size on the Jetty connectors.void
setResponseHeaderSize(Integer responseHeaderSize)
Allows to configure a custom value of the response header size on the Jetty connectors.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.void
setSocketConnectorProperties(Map<String,Object> socketConnectorProperties)
A map which contains general HTTP connector properties.void
setSocketConnectors(Map<Integer,org.eclipse.jetty.server.Connector> socketConnectors)
A map which contains per port number specific HTTP connectors.void
setSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters)
To configure security using SSLContextParametersvoid
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).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).void
setSslSocketConnectorProperties(Map<String,Object> sslSocketConnectorProperties)
A map which contains general SSL connector properties.void
setSslSocketConnectors(Map<Integer,org.eclipse.jetty.server.Connector> connectors)
A map which contains per port number specific SSL connectors.void
setThreadPool(org.eclipse.jetty.util.thread.ThreadPool threadPool)
To use a custom thread pool for the server.void
setUseContinuation(boolean useContinuation)
Whether or not to use Jetty continuations for the Jetty Server.void
setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters)
Enable usage of global SSL context parametersvoid
setUseXForwardedForHeader(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:
createEndpoint
in 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:
canConnect
in classorg.apache.camel.http.common.HttpCommonComponent
- Throws:
Exception
-
connect
public void connect(org.apache.camel.http.common.HttpConsumer consumer) throws Exception
Connects the URL specified on the endpoint to the specified processor.- Overrides:
connect
in classorg.apache.camel.http.common.HttpCommonComponent
- Throws:
Exception
-
disconnect
public void disconnect(org.apache.camel.http.common.HttpConsumer consumer) throws Exception
Disconnects the URL specified on the endpoint from the specified processor.- Overrides:
disconnect
in 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:
setHttpBinding
in 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:
setHttpConfiguration
in 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:
isUseGlobalSslContextParameters
in 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:
setUseGlobalSslContextParameters
in 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.
-
getMaxFileSize
public long getMaxFileSize()
-
setMaxFileSize
@Metadata(description="The maximum size allowed for uploaded files. -1 means no limit", defaultValue="-1", label="consumer,advanced") public void setMaxFileSize(long maxFileSize)
-
getMaxRequestSize
public long getMaxRequestSize()
-
setMaxRequestSize
@Metadata(description="The maximum size allowed for multipart/form-data requests. -1 means no limit", defaultValue="-1", label="consumer,advanced") public void setMaxRequestSize(long maxRequestSize)
-
getFileSizeThreshold
public int getFileSizeThreshold()
-
setFileSizeThreshold
@Metadata(description="The size threshold after which files will be written to disk for multipart/form-data requests. By default the files are not written to disk", defaultValue="0", label="consumer,advanced") public void setFileSizeThreshold(int fileSizeThreshold)
-
getFilesLocation
public String getFilesLocation()
-
setFilesLocation
@Metadata(description="The directory location where files will be store for multipart/form-data requests. By default the files are written in the system temporary folder", label="consumer,advanced") public void setFilesLocation(String filesLocation)
-
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:
createConsumer
in 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:
createApiConsumer
in 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:
doInit
in classorg.apache.camel.support.DefaultComponent
- Throws:
Exception
-
-