Package org.elasticsearch.http.netty4
Class Netty4HttpServerTransport
- java.lang.Object
-
- org.elasticsearch.common.component.AbstractLifecycleComponent
-
- org.elasticsearch.http.netty4.Netty4HttpServerTransport
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,LifecycleComponent,Releasable,HttpServerTransport
public class Netty4HttpServerTransport extends AbstractLifecycleComponent implements HttpServerTransport
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classNetty4HttpServerTransport.HttpChannelHandler-
Nested classes/interfaces inherited from interface org.elasticsearch.http.HttpServerTransport
HttpServerTransport.Dispatcher
-
-
Field Summary
Fields Modifier and Type Field Description protected BigArraysbigArraysprotected java.lang.String[]bindHostsprotected BoundTransportAddressboundAddressprotected booleancompressionprotected intcompressionLevelprotected booleandetailedErrorsEnabledprotected ByteSizeValuemaxChunkSizeprotected intmaxCompositeBufferComponentsprotected ByteSizeValuemaxContentLengthprotected ByteSizeValuemaxHeaderSizeprotected ByteSizeValuemaxInitialLineLengthprotected NetworkServicenetworkServiceprotected booleanpipeliningprotected intpipeliningMaxEventsprotected PortsRangeportprotected java.lang.String[]publishHostsprotected io.netty.channel.RecvByteBufAllocatorrecvByteBufAllocatorprotected booleanresetCookiesprotected booleanreuseAddressprotected io.netty.bootstrap.ServerBootstrapserverBootstrapprotected java.util.List<io.netty.channel.Channel>serverChannelsstatic Setting<java.lang.Integer>SETTING_HTTP_NETTY_MAX_COMPOSITE_BUFFER_COMPONENTSstatic Setting<ByteSizeValue>SETTING_HTTP_NETTY_RECEIVE_PREDICTOR_MAXDeprecated.This (undocumented) setting is deprecated to reduce complexity and is removed in 7.0.static Setting<ByteSizeValue>SETTING_HTTP_NETTY_RECEIVE_PREDICTOR_MINDeprecated.This (undocumented) setting is deprecated to reduce complexity and is removed in 7.0.static Setting<ByteSizeValue>SETTING_HTTP_NETTY_RECEIVE_PREDICTOR_SIZEstatic Setting<java.lang.Integer>SETTING_HTTP_WORKER_COUNTprotected booleantcpKeepAliveprotected booleantcpNoDelayprotected ByteSizeValuetcpReceiveBufferSizeprotected ByteSizeValuetcpSendBufferSizeprotected ThreadPoolthreadPoolprotected intworkerCountprotected NamedXContentRegistryxContentRegistryThe registry used to construct parsers so they supportXContentParser.namedObject(Class, String, Object).-
Fields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle
-
Fields inherited from interface org.elasticsearch.http.HttpServerTransport
HTTP_SERVER_WORKER_THREAD_NAME_PREFIX
-
-
Constructor Summary
Constructors Constructor Description Netty4HttpServerTransport(Settings settings, NetworkService networkService, BigArrays bigArrays, ThreadPool threadPool, NamedXContentRegistry xContentRegistry, HttpServerTransport.Dispatcher dispatcher)
-
Method Summary
Modifier and Type Method Description BoundTransportAddressboundAddress()io.netty.channel.ChannelHandlerconfigureServerChannelHandler()protected voiddoClose()protected voiddoStart()protected voiddoStop()protected voidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, java.lang.Throwable cause)Netty4CorsConfiggetCorsConfig()HttpInfoinfo()Settingssettings()HttpStatsstats()-
Methods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.component.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
-
Methods inherited from interface org.elasticsearch.common.lease.Releasable
close
-
-
-
-
Field Detail
-
SETTING_HTTP_NETTY_MAX_COMPOSITE_BUFFER_COMPONENTS
public static Setting<java.lang.Integer> SETTING_HTTP_NETTY_MAX_COMPOSITE_BUFFER_COMPONENTS
-
SETTING_HTTP_WORKER_COUNT
public static final Setting<java.lang.Integer> SETTING_HTTP_WORKER_COUNT
-
SETTING_HTTP_NETTY_RECEIVE_PREDICTOR_SIZE
public static final Setting<ByteSizeValue> SETTING_HTTP_NETTY_RECEIVE_PREDICTOR_SIZE
-
SETTING_HTTP_NETTY_RECEIVE_PREDICTOR_MIN
@Deprecated public static final Setting<ByteSizeValue> SETTING_HTTP_NETTY_RECEIVE_PREDICTOR_MIN
Deprecated.This (undocumented) setting is deprecated to reduce complexity and is removed in 7.0. See #26165 for details.
-
SETTING_HTTP_NETTY_RECEIVE_PREDICTOR_MAX
@Deprecated public static final Setting<ByteSizeValue> SETTING_HTTP_NETTY_RECEIVE_PREDICTOR_MAX
Deprecated.This (undocumented) setting is deprecated to reduce complexity and is removed in 7.0. See #26165 for details.
-
networkService
protected final NetworkService networkService
-
bigArrays
protected final BigArrays bigArrays
-
maxContentLength
protected final ByteSizeValue maxContentLength
-
maxInitialLineLength
protected final ByteSizeValue maxInitialLineLength
-
maxHeaderSize
protected final ByteSizeValue maxHeaderSize
-
maxChunkSize
protected final ByteSizeValue maxChunkSize
-
workerCount
protected final int workerCount
-
pipelining
protected final boolean pipelining
-
pipeliningMaxEvents
protected final int pipeliningMaxEvents
-
compression
protected final boolean compression
-
compressionLevel
protected final int compressionLevel
-
resetCookies
protected final boolean resetCookies
-
port
protected final PortsRange port
-
bindHosts
protected final java.lang.String[] bindHosts
-
publishHosts
protected final java.lang.String[] publishHosts
-
detailedErrorsEnabled
protected final boolean detailedErrorsEnabled
-
threadPool
protected final ThreadPool threadPool
-
xContentRegistry
protected final NamedXContentRegistry xContentRegistry
The registry used to construct parsers so they supportXContentParser.namedObject(Class, String, Object).
-
tcpNoDelay
protected final boolean tcpNoDelay
-
tcpKeepAlive
protected final boolean tcpKeepAlive
-
reuseAddress
protected final boolean reuseAddress
-
tcpSendBufferSize
protected final ByteSizeValue tcpSendBufferSize
-
tcpReceiveBufferSize
protected final ByteSizeValue tcpReceiveBufferSize
-
recvByteBufAllocator
protected final io.netty.channel.RecvByteBufAllocator recvByteBufAllocator
-
maxCompositeBufferComponents
protected final int maxCompositeBufferComponents
-
serverBootstrap
protected volatile io.netty.bootstrap.ServerBootstrap serverBootstrap
-
boundAddress
protected volatile BoundTransportAddress boundAddress
-
serverChannels
protected final java.util.List<io.netty.channel.Channel> serverChannels
-
-
Constructor Detail
-
Netty4HttpServerTransport
public Netty4HttpServerTransport(Settings settings, NetworkService networkService, BigArrays bigArrays, ThreadPool threadPool, NamedXContentRegistry xContentRegistry, HttpServerTransport.Dispatcher dispatcher)
-
-
Method Detail
-
settings
public Settings settings()
-
doStart
protected void doStart()
- Specified by:
doStartin classAbstractLifecycleComponent
-
doStop
protected void doStop()
- Specified by:
doStopin classAbstractLifecycleComponent
-
doClose
protected void doClose()
- Specified by:
doClosein classAbstractLifecycleComponent
-
boundAddress
public BoundTransportAddress boundAddress()
- Specified by:
boundAddressin interfaceHttpServerTransport
-
info
public HttpInfo info()
- Specified by:
infoin interfaceHttpServerTransport
-
stats
public HttpStats stats()
- Specified by:
statsin interfaceHttpServerTransport
-
getCorsConfig
public Netty4CorsConfig getCorsConfig()
-
exceptionCaught
protected void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, java.lang.Throwable cause) throws java.lang.Exception- Throws:
java.lang.Exception
-
configureServerChannelHandler
public io.netty.channel.ChannelHandler configureServerChannelHandler()
-
-