Package org.apache.camel.component.jetty
Class JettyHttpEndpoint
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.apache.camel.http.common.HttpCommonEndpoint
org.apache.camel.component.jetty.JettyHttpEndpoint
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.cloud.DiscoverableService
,org.apache.camel.ComponentAware
,org.apache.camel.Endpoint
,org.apache.camel.IsSingleton
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.HasCamelContext
,org.apache.camel.spi.HasId
,org.apache.camel.spi.HeaderFilterStrategyAware
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
public abstract class JettyHttpEndpoint
extends org.apache.camel.http.common.HttpCommonEndpoint
-
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
ConstructorsModifierConstructorDescriptionprotected
JettyHttpEndpoint
(JettyHttpComponent component, String uri, URI httpURL) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.Consumer
createConsumer
(org.apache.camel.Processor processor) org.apache.camel.Producer
List
<jakarta.servlet.Filter> List
<org.eclipse.jetty.server.Handler> long
jakarta.servlet.Filter
org.apache.camel.support.jsse.SSLContextParameters
boolean
boolean
boolean
boolean
boolean
boolean
void
setContinuationTimeout
(Long continuationTimeout) Allows to set a timeout in millis when using Jetty as consumer (server).void
setEnableCORS
(boolean enableCORS) If the option is true, Jetty server will setup the CrossOriginFilter which supports the CORS out of box.void
setEnableJmx
(boolean enableJmx) If this option is true, Jetty JMX support will be enabled for this endpoint.void
setEnableMultipartFilter
(boolean enableMultipartFilter) Whether org.apache.camel.component.jetty.MultiPartFilter is enabled or not.void
setFileSizeThreshold
(Integer fileSizeThreshold) void
setFilesLocation
(String filesLocation) void
setFilterInitParameters
(Map<String, String> filterInitParameters) Configuration of the filter init parameters.void
setFilters
(List<jakarta.servlet.Filter> filterList) Allows using a custom filters which is putted into a list and can be find in the Registry.void
setHandlers
(List<org.eclipse.jetty.server.Handler> handlers) Specifies a comma-delimited set of org.mortbay.jetty.Handler instances in your Registry (such as your Spring ApplicationContext).void
setIdleTimeout
(long idleTimeout) The max idle time is applied to an HTTP request for IO operations and delayed dispatch.void
setMaxFileSize
(Long maxFileSize) void
setMaxRequestSize
(Long maxRequestSize) void
setMultipartFilter
(jakarta.servlet.Filter filter) Allows using a custom multipart filter.void
setSendDateHeader
(boolean sendDateHeader) If the option is true, jetty server will send the date header to the client which sends the request.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
setSessionSupport
(boolean support) Specifies whether to enable the session manager on the server side of Jetty.void
setSslContextParameters
(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters) To configure security using SSLContextParametersvoid
setUseContinuation
(Boolean useContinuation) Whether or not to use Jetty continuations for the Jetty Server.Methods inherited from class org.apache.camel.http.common.HttpCommonEndpoint
canConnect, connect, disconnect, getAuthDomain, getAuthHost, getAuthMethod, getAuthMethodPriority, getAuthPassword, getAuthUsername, getBinding, getCookieHandler, getHeaderFilterStrategy, getHttpBinding, getHttpMethod, getHttpMethodRestrict, getHttpUri, getOauth2ClientId, getOauth2ClientSecret, getOauth2TokenEndpoint, getOkStatusCodeRange, getPath, getPort, getProtocol, getProxyAuthDomain, getProxyAuthHost, getProxyAuthMethod, getProxyAuthNtHost, getProxyAuthPassword, getProxyAuthPort, getProxyAuthScheme, getProxyAuthUsername, getProxyHost, getProxyPort, getResponseBufferSize, getServiceProperties, isAsync, isBridgeEndpoint, isChunked, isConnectionClose, isCopyHeaders, isDisableStreamCache, isEagerCheckContentAvailable, isIgnoreResponseBody, isLenientProperties, isLogException, isMapHttpMessageBody, isMapHttpMessageFormUrlEncodedBody, isMapHttpMessageHeaders, isMatchOnUriPrefix, isMuteException, isOptionsEnabled, isPreserveHostHeader, isThrowExceptionOnFailure, isTraceEnabled, isTransferException, setAsync, setAuthDomain, setAuthHost, setAuthMethod, setAuthMethodPriority, setAuthPassword, setAuthUsername, setBridgeEndpoint, setChunked, setConnectionClose, setCookieHandler, setCopyHeaders, setDisableStreamCache, setEagerCheckContentAvailable, setHeaderFilterStrategy, setHttpBinding, setHttpMethod, setHttpMethodRestrict, setHttpUri, setIgnoreResponseBody, setLogException, setMapHttpMessageBody, setMapHttpMessageFormUrlEncodedBody, setMapHttpMessageHeaders, setMatchOnUriPrefix, setMuteException, setOauth2ClientId, setOauth2ClientSecret, setOauth2TokenEndpoint, setOkStatusCodeRange, setOptionsEnabled, setPreserveHostHeader, setProxyAuthDomain, setProxyAuthHost, setProxyAuthMethod, setProxyAuthNtHost, setProxyAuthPassword, setProxyAuthPort, setProxyAuthScheme, setProxyAuthUsername, setProxyHost, setProxyPort, setResponseBufferSize, setThrowExceptionOnFailure, setTraceEnabled, setTransferException
Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toString
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStart, doStop, 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, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.camel.ComponentAware
getComponent
Methods inherited from interface org.apache.camel.Endpoint
getEndpointBaseUri, isSingletonProducer
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
-
JettyHttpEndpoint
-
-
Method Details
-
getComponent
- Specified by:
getComponent
in interfaceorg.apache.camel.ComponentAware
- Overrides:
getComponent
in classorg.apache.camel.http.common.HttpCommonEndpoint
-
createProducer
- Throws:
Exception
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception - Throws:
Exception
-
setSessionSupport
public void setSessionSupport(boolean support) Specifies whether to enable the session manager on the server side of Jetty. -
isSessionSupport
public boolean isSessionSupport() -
getHandlers
-
setHandlers
Specifies a comma-delimited set of org.mortbay.jetty.Handler instances in your Registry (such as your Spring ApplicationContext). These handlers are added to the Jetty servlet context (for example, to add security). Important: You can not use different handlers with different Jetty endpoints using the same port number. The handlers is associated to the port number. If you need different handlers, then use different port numbers. -
isEnableJmx
public boolean isEnableJmx() -
setEnableJmx
public void setEnableJmx(boolean enableJmx) If this option is true, Jetty JMX support will be enabled for this endpoint. See Jetty JMX support for more details. -
isSendServerVersion
public boolean isSendServerVersion() -
setSendServerVersion
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. -
isSendDateHeader
public boolean isSendDateHeader() -
setSendDateHeader
public void setSendDateHeader(boolean sendDateHeader) If the option is true, jetty server will send the date header 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. -
isEnableMultipartFilter
public boolean isEnableMultipartFilter() -
setEnableMultipartFilter
public void setEnableMultipartFilter(boolean enableMultipartFilter) Whether org.apache.camel.component.jetty.MultiPartFilter is enabled or not. You should set this value to false when bridging endpoints, to ensure multipart requests is proxied/bridged as well. -
setMultipartFilter
public void setMultipartFilter(jakarta.servlet.Filter filter) Allows using a custom multipart filter. Note: setting multipartFilter forces the value of enableMultipartFilter to true. -
getMultipartFilter
public jakarta.servlet.Filter getMultipartFilter() -
setFilters
Allows using a custom filters which is putted into a list and can be find in the Registry. Multiple values can be separated by comma. -
getFilters
-
getContinuationTimeout
-
setContinuationTimeout
Allows to set a timeout in millis when using Jetty as consumer (server). By default Jetty uses 30000. You can use a value of invalid input: '<'= 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. -
getUseContinuation
-
setUseContinuation
Whether or not to use Jetty continuations for the Jetty Server. -
getSslContextParameters
public org.apache.camel.support.jsse.SSLContextParameters getSslContextParameters() -
setSslContextParameters
public void setSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters) To configure security using SSLContextParameters -
getIdleTimeout
public long getIdleTimeout() -
setIdleTimeout
public void setIdleTimeout(long idleTimeout) The max idle time is applied to an HTTP request for IO operations and delayed dispatch. -
getFilterInitParameters
-
setFilterInitParameters
Configuration of the filter init parameters. These parameters will be applied to the filter list before starting the jetty server. -
isEnableCORS
public boolean isEnableCORS() -
setEnableCORS
public void setEnableCORS(boolean enableCORS) If the option is true, Jetty server will setup the CrossOriginFilter which supports the CORS out of box. -
getFilesLocation
-
setFilesLocation
-
getMaxFileSize
-
setMaxFileSize
-
getFileSizeThreshold
-
setFileSizeThreshold
-
getMaxRequestSize
-
setMaxRequestSize
-