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.Endpoint
,org.apache.camel.IsSingleton
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,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
-
-
Constructor Summary
Constructors Constructor Description JettyHttpEndpoint(JettyHttpComponent component, String uri, URI httpURL)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.apache.camel.Consumer
createConsumer(org.apache.camel.Processor processor)
abstract JettyContentExchange
createContentExchange()
org.apache.camel.Producer
createProducer()
JettyHttpComponent
getComponent()
Long
getContinuationTimeout()
Map<String,String>
getFilterInitParameters()
List<javax.servlet.Filter>
getFilters()
List<org.eclipse.jetty.server.Handler>
getHandlers()
javax.servlet.Filter
getMultipartFilter()
org.apache.camel.support.jsse.SSLContextParameters
getSslContextParameters()
Boolean
getUseContinuation()
boolean
isEnableCORS()
boolean
isEnableJmx()
boolean
isEnableMultipartFilter()
boolean
isSendDateHeader()
boolean
isSendServerVersion()
boolean
isSessionSupport()
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
setFilterInitParameters(Map<String,String> filterInitParameters)
Configuration of the filter init parameters.void
setFilters(List<javax.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
setMultipartFilter(javax.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, 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, 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, setMapHttpMessageBody, setMapHttpMessageFormUrlEncodedBody, setMapHttpMessageHeaders, setMatchOnUriPrefix, setMuteException, 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, doStart, doStop, 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, 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
-
-
-
-
Constructor Detail
-
JettyHttpEndpoint
public JettyHttpEndpoint(JettyHttpComponent component, String uri, URI httpURL)
-
-
Method Detail
-
getComponent
public JettyHttpComponent getComponent()
- Overrides:
getComponent
in classorg.apache.camel.http.common.HttpCommonEndpoint
-
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
public List<org.eclipse.jetty.server.Handler> getHandlers()
-
setHandlers
public 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). 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(javax.servlet.Filter filter)
Allows using a custom multipart filter. Note: setting multipartFilter forces the value of enableMultipartFilter to true.
-
getMultipartFilter
public javax.servlet.Filter getMultipartFilter()
-
setFilters
public void setFilters(List<javax.servlet.Filter> filterList)
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
public List<javax.servlet.Filter> getFilters()
-
getContinuationTimeout
public Long getContinuationTimeout()
-
setContinuationTimeout
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.
-
getUseContinuation
public Boolean getUseContinuation()
-
setUseContinuation
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
public void setSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters)
To configure security using SSLContextParameters
-
setFilterInitParameters
public void setFilterInitParameters(Map<String,String> filterInitParameters)
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.
-
createContentExchange
public abstract JettyContentExchange createContentExchange()
-
-