Class NettyHttpEndpoint
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.apache.camel.component.netty.NettyEndpoint
org.apache.camel.component.netty.http.NettyHttpEndpoint
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.AsyncEndpoint,org.apache.camel.CamelContextAware,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.14.0",
scheme="netty-http",
extendsScheme="netty",
title="Netty HTTP",
syntax="netty-http:protocol://host:port/path",
category={NETWORKING,HTTP},
lenientProperties=true,
headersClass=NettyHttpConstants.class)
@Metadata(excludeProperties="textline,delimiter,autoAppendDelimiter,decoderMaxLineLength,encoding,allowDefaultCodec,udpConnectionlessSending,networkInterface,clientMode,reconnect,reconnectInterval,useByteBuf,udpByteArrayCodec,broadcast,correlationManager",
annotations="protocol=http")
public class NettyHttpEndpoint
extends org.apache.camel.component.netty.NettyEndpoint
implements org.apache.camel.AsyncEndpoint, org.apache.camel.spi.HeaderFilterStrategyAware
Netty HTTP server and client using the Netty 4.x.
-
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
ConstructorsConstructorDescriptionNettyHttpEndpoint(String endpointUri, NettyHttpComponent component, org.apache.camel.component.netty.NettyConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.ConsumercreateConsumer(org.apache.camel.Processor processor) org.apache.camel.PollingConsumerorg.apache.camel.Producerprotected voiddoInit()org.apache.camel.http.base.cookie.CookieHandlerorg.apache.camel.spi.HeaderFilterStrategybooleanbooleanvoidsetConfiguration(org.apache.camel.component.netty.NettyConfiguration configuration) voidsetCookieHandler(org.apache.camel.http.base.cookie.CookieHandler cookieHandler) Configure a cookie handler to maintain a HTTP sessionvoidsetHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy) To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter headers.voidsetHttpMethodRestrict(String httpMethodRestrict) To disable HTTP methods on the Netty HTTP consumer.voidsetNettyHttpBinding(NettyHttpBinding nettyHttpBinding) To use a custom org.apache.camel.component.netty.http.NettyHttpBinding for binding to/from Netty and Camel Message API.voidsetNettySharedHttpServer(NettySharedHttpServer nettySharedHttpServer) To use a shared Netty HTTP server.voidsetSecurityConfiguration(NettyHttpSecurityConfiguration securityConfiguration) Refers to a org.apache.camel.component.netty.http.NettyHttpSecurityConfiguration for configuring secure web resources.voidsetSecurityOptions(Map<String, Object> securityOptions) To configure NettyHttpSecurityConfiguration using key/value pairs from the mapvoidsetTraceEnabled(boolean traceEnabled) Specifies whether to enable HTTP TRACE for this Netty HTTP consumer.Methods inherited from class org.apache.camel.component.netty.NettyEndpoint
createEndpointUri, enrichWithClientCertInformation, getServiceProtocol, getServiceUrl, getSSLSession, isSynchronous, setSynchronous, updateMessageHeaderMethods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createExchange, createExchange, 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
getComponent, setComponentMethods inherited from interface org.apache.camel.Endpoint
configureExchange, configureProperties, createAsyncProducer, createExchange, createExchange, getCamelContext, getEndpointBaseUri, getEndpointKey, getEndpointUri, getExchangePattern, isRemote, isSingletonProducer, setCamelContextMethods inherited from interface org.apache.camel.spi.EndpointServiceLocation
getServiceMetadataMethods inherited from interface org.apache.camel.IsSingleton
isSingletonMethods 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
-
NettyHttpEndpoint
public NettyHttpEndpoint(String endpointUri, NettyHttpComponent component, org.apache.camel.component.netty.NettyConfiguration configuration)
-
-
Method Details
-
getComponent
- Specified by:
getComponentin interfaceorg.apache.camel.ComponentAware- Overrides:
getComponentin classorg.apache.camel.component.netty.NettyEndpoint
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception - Specified by:
createConsumerin interfaceorg.apache.camel.Endpoint- Overrides:
createConsumerin classorg.apache.camel.component.netty.NettyEndpoint- Throws:
Exception
-
createProducer
- Specified by:
createProducerin interfaceorg.apache.camel.Endpoint- Overrides:
createProducerin classorg.apache.camel.component.netty.NettyEndpoint- Throws:
Exception
-
createPollingConsumer
- Specified by:
createPollingConsumerin interfaceorg.apache.camel.Endpoint- Overrides:
createPollingConsumerin classorg.apache.camel.support.DefaultEndpoint- Throws:
Exception
-
isLenientProperties
public boolean isLenientProperties()- Specified by:
isLenientPropertiesin interfaceorg.apache.camel.Endpoint- Overrides:
isLenientPropertiesin classorg.apache.camel.support.DefaultEndpoint
-
setConfiguration
public void setConfiguration(org.apache.camel.component.netty.NettyConfiguration configuration) - Overrides:
setConfigurationin classorg.apache.camel.component.netty.NettyEndpoint
-
getConfiguration
- Overrides:
getConfigurationin classorg.apache.camel.component.netty.NettyEndpoint
-
getNettyHttpBinding
-
setNettyHttpBinding
To use a custom org.apache.camel.component.netty.http.NettyHttpBinding for binding to/from Netty and Camel Message API. -
getHeaderFilterStrategy
public org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()- Specified by:
getHeaderFilterStrategyin interfaceorg.apache.camel.spi.HeaderFilterStrategyAware
-
setHeaderFilterStrategy
public void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy) To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter headers.- Specified by:
setHeaderFilterStrategyin interfaceorg.apache.camel.spi.HeaderFilterStrategyAware
-
isTraceEnabled
public boolean isTraceEnabled() -
setTraceEnabled
public void setTraceEnabled(boolean traceEnabled) Specifies whether to enable HTTP TRACE for this Netty HTTP consumer. By default TRACE is turned off. -
getHttpMethodRestrict
-
setHttpMethodRestrict
To disable HTTP methods on the Netty HTTP consumer. You can specify multiple separated by comma. -
getSecurityConfiguration
-
setSecurityConfiguration
Refers to a org.apache.camel.component.netty.http.NettyHttpSecurityConfiguration for configuring secure web resources. -
getSecurityOptions
-
setSecurityOptions
To configure NettyHttpSecurityConfiguration using key/value pairs from the map -
getCookieHandler
public org.apache.camel.http.base.cookie.CookieHandler getCookieHandler() -
setCookieHandler
public void setCookieHandler(org.apache.camel.http.base.cookie.CookieHandler cookieHandler) Configure a cookie handler to maintain a HTTP session -
doInit
- Overrides:
doInitin classorg.apache.camel.support.DefaultEndpoint- Throws:
Exception
-