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.EndpointServiceLocation,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",
annotations="protocol=http")
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.ConsumercreateConsumer(org.apache.camel.Processor processor) org.apache.camel.Producerorg.apache.camel.http.common.HttpBindingbooleanbooleanvoidsetAttachmentMultipartBinding(boolean attachmentMultipartBinding) Whether to automatic bind multipart/form-data as attachments on the CamelExchange.voidsetContextPath(String contextPath) The context-path to usevoidsetFileNameExtWhitelist(String fileNameExtWhitelist) Whitelist of accepted filename extensions for accepting uploaded files.voidsetHttpBinding(org.apache.camel.http.common.HttpBinding binding) voidsetServletName(String name) Name of the servlet to useMethods inherited from class org.apache.camel.http.common.HttpCommonEndpoint
canConnect, connect, disconnect, getAuthBearerToken, getAuthDomain, getAuthHost, getAuthMethod, getAuthPassword, getAuthUsername, getBinding, getCookieHandler, getHeaderFilterStrategy, getHttpMethod, getHttpMethodRestrict, getHttpUri, getOauth2CachedTokensDefaultExpirySeconds, getOauth2CachedTokensExpirationMarginSeconds, getOauth2ClientId, getOauth2ClientSecret, getOauth2ResourceIndicator, getOauth2Scope, getOauth2TokenEndpoint, getOkStatusCodeRange, getPath, getPort, getProtocol, getProxyAuthDomain, getProxyAuthHost, getProxyAuthMethod, getProxyAuthNtHost, getProxyAuthPassword, getProxyAuthPort, getProxyAuthScheme, getProxyAuthUsername, getProxyHost, getProxyPort, getResponseBufferSize, getServiceProperties, getServiceProtocol, getServiceUrl, isAsync, isBridgeEndpoint, isChunked, isConnectionClose, isCopyHeaders, isDisableStreamCache, isEagerCheckContentAvailable, isIgnoreResponseBody, isLogException, isMapHttpMessageBody, isMapHttpMessageFormUrlEncodedBody, isMapHttpMessageHeaders, isMatchOnUriPrefix, isMuteException, isOauth2BodyAuthentication, isOauth2CacheTokens, isOptionsEnabled, isPreserveHostHeader, isThrowExceptionOnFailure, isTraceEnabled, isTransferException, setAsync, setAuthBearerToken, setAuthDomain, setAuthHost, setAuthMethod, setAuthPassword, setAuthUsername, setBridgeEndpoint, setChunked, setConnectionClose, setCookieHandler, setCopyHeaders, setDisableStreamCache, setEagerCheckContentAvailable, setHeaderFilterStrategy, setHttpMethod, setHttpMethodRestrict, setHttpUri, setIgnoreResponseBody, setLogException, setMapHttpMessageBody, setMapHttpMessageFormUrlEncodedBody, setMapHttpMessageHeaders, setMatchOnUriPrefix, setMuteException, setOauth2BodyAuthentication, setOauth2CachedTokensDefaultExpirySeconds, setOauth2CachedTokensExpirationMarginSeconds, setOauth2CacheTokens, setOauth2ClientId, setOauth2ClientSecret, setOauth2ResourceIndicator, setOauth2Scope, setOauth2TokenEndpoint, setOkStatusCodeRange, setOptionsEnabled, setPreserveHostHeader, setProxyAuthDomain, setProxyAuthHost, setProxyAuthMethod, setProxyAuthNtHost, setProxyAuthPassword, setProxyAuthPort, setProxyAuthScheme, setProxyAuthUsername, setProxyHost, setProxyPort, setResponseBufferSize, setThrowExceptionOnFailure, setTraceEnabled, setTransferExceptionMethods 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, toStringMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStart, doStop, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.ComponentAware
getComponentMethods inherited from interface org.apache.camel.Endpoint
getEndpointBaseUri, isRemote, isSingletonProducerMethods inherited from interface org.apache.camel.spi.EndpointServiceLocation
getServiceMetadataMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods 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:
getComponentin interfaceorg.apache.camel.ComponentAware- Overrides:
getComponentin classorg.apache.camel.http.common.HttpCommonEndpoint
-
getHttpBinding
public org.apache.camel.http.common.HttpBinding getHttpBinding()- Overrides:
getHttpBindingin classorg.apache.camel.http.common.HttpCommonEndpoint
-
setHttpBinding
public void setHttpBinding(org.apache.camel.http.common.HttpBinding binding) - Overrides:
setHttpBindingin 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:
isLenientPropertiesin interfaceorg.apache.camel.Endpoint- Overrides:
isLenientPropertiesin classorg.apache.camel.http.common.HttpCommonEndpoint
-