Class ServletEndpoint
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.servlet.ServletEndpoint
- 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
@UriEndpoint(firstVersion="2.0.0",
scheme="servlet",
extendsScheme="http",
title="Servlet",
syntax="servlet:contextPath",
consumerOnly=true,
category=HTTP)
@Metadata(excludeProperties="httpUri")
public class ServletEndpoint
extends org.apache.camel.http.common.HttpCommonEndpoint
Serve HTTP requests by a Servlet.
-
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
ConstructorsConstructorDescriptionServletEndpoint
(String endPointURI, ServletComponent component, URI httpUri) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.Consumer
createConsumer
(org.apache.camel.Processor processor) org.apache.camel.Producer
org.apache.camel.http.common.HttpBinding
boolean
boolean
void
setAttachmentMultipartBinding
(boolean attachmentMultipartBinding) Whether to automatic bind multipart/form-data as attachments on the CamelExchange
.void
setContextPath
(String contextPath) The context-path to usevoid
setFileNameExtWhitelist
(String fileNameExtWhitelist) Whitelist of accepted filename extensions for accepting uploaded files.void
setHttpBinding
(org.apache.camel.http.common.HttpBinding binding) void
setServletName
(String name) Name of the servlet to useMethods inherited from class org.apache.camel.http.common.HttpCommonEndpoint
canConnect, connect, disconnect, getAuthDomain, getAuthHost, getAuthMethod, getAuthMethodPriority, getAuthPassword, getAuthUsername, getBinding, getCookieHandler, getHeaderFilterStrategy, 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, 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, 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, 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
-
ServletEndpoint
public ServletEndpoint() -
ServletEndpoint
public ServletEndpoint(String endPointURI, ServletComponent component, URI httpUri) throws URISyntaxException - Throws:
URISyntaxException
-
-
Method Details
-
getComponent
- Specified by:
getComponent
in interfaceorg.apache.camel.ComponentAware
- Overrides:
getComponent
in classorg.apache.camel.http.common.HttpCommonEndpoint
-
getHttpBinding
public org.apache.camel.http.common.HttpBinding getHttpBinding()- Overrides:
getHttpBinding
in classorg.apache.camel.http.common.HttpCommonEndpoint
-
setHttpBinding
public void setHttpBinding(org.apache.camel.http.common.HttpBinding binding) - Overrides:
setHttpBinding
in classorg.apache.camel.http.common.HttpCommonEndpoint
-
getContextPath
-
setContextPath
The context-path to use -
setServletName
Name of the servlet to use -
getServletName
-
isAttachmentMultipartBinding
public boolean isAttachmentMultipartBinding() -
setAttachmentMultipartBinding
public void setAttachmentMultipartBinding(boolean attachmentMultipartBinding) Whether to automatic bind multipart/form-data as attachments on the CamelExchange
. The options attachmentMultipartBinding=true and disableStreamCache=false cannot work together. Remove disableStreamCache to use AttachmentMultipartBinding. This is turn off by default as this may require servlet specific configuration to enable this when using Servlet's. -
getFileNameExtWhitelist
-
setFileNameExtWhitelist
Whitelist of accepted filename extensions for accepting uploaded files. Multiple extensions can be separated by comma, such as txt,xml. -
createProducer
- Throws:
Exception
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception - Throws:
Exception
-
isLenientProperties
public boolean isLenientProperties()- Specified by:
isLenientProperties
in interfaceorg.apache.camel.Endpoint
- Overrides:
isLenientProperties
in classorg.apache.camel.http.common.HttpCommonEndpoint
-