Package org.elasticsearch.http
Class AbstractHttpServerTransport
java.lang.Object
org.elasticsearch.common.component.AbstractLifecycleComponent
org.elasticsearch.http.AbstractHttpServerTransport
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,LifecycleComponent
,Releasable
,HttpServerTransport
,ReportingService<HttpInfo>
public abstract class AbstractHttpServerTransport extends AbstractLifecycleComponent implements HttpServerTransport
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.http.HttpServerTransport
HttpServerTransport.Dispatcher
Nested classes/interfaces inherited from interface org.elasticsearch.node.ReportingService
ReportingService.Info
-
Field Summary
Fields Modifier and Type Field Description protected BigArrays
bigArrays
protected CorsHandler.Config
corsConfig
protected HttpServerTransport.Dispatcher
dispatcher
HttpHandlingSettings
handlingSettings
protected ByteSizeValue
maxContentLength
protected NetworkService
networkService
protected PortsRange
port
protected Settings
settings
protected ThreadPool
threadPool
Fields inherited from interface org.elasticsearch.http.HttpServerTransport
HTTP_SERVER_WORKER_THREAD_NAME_PREFIX
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractHttpServerTransport(Settings settings, NetworkService networkService, BigArrays bigArrays, ThreadPool threadPool, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, HttpServerTransport.Dispatcher dispatcher, ClusterSettings clusterSettings)
-
Method Summary
Modifier and Type Method Description protected abstract HttpServerChannel
bind(java.net.InetSocketAddress hostAddress)
protected void
bindServer()
BoundTransportAddress
boundAddress()
protected void
doClose()
protected void
doStop()
void
incomingRequest(HttpRequest httpRequest, HttpChannel httpChannel)
This method handles an incoming http request.HttpInfo
info()
void
onException(HttpChannel channel, java.lang.Exception e)
protected void
onServerException(HttpServerChannel channel, java.lang.Exception e)
protected void
serverAcceptedChannel(HttpChannel httpChannel)
HttpStats
stats()
protected abstract void
stopInternal()
Called to tear down internal resourcesMethods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, doStart, 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
-
Field Details
-
Constructor Details
-
AbstractHttpServerTransport
protected AbstractHttpServerTransport(Settings settings, NetworkService networkService, BigArrays bigArrays, ThreadPool threadPool, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, HttpServerTransport.Dispatcher dispatcher, ClusterSettings clusterSettings)
-
-
Method Details
-
boundAddress
- Specified by:
boundAddress
in interfaceHttpServerTransport
-
info
- Specified by:
info
in interfaceHttpServerTransport
- Specified by:
info
in interfaceReportingService<HttpInfo>
-
stats
- Specified by:
stats
in interfaceHttpServerTransport
-
bindServer
protected void bindServer() -
bind
protected abstract HttpServerChannel bind(java.net.InetSocketAddress hostAddress) throws java.lang.Exception- Throws:
java.lang.Exception
-
doStop
protected void doStop()- Specified by:
doStop
in classAbstractLifecycleComponent
-
doClose
protected void doClose()- Specified by:
doClose
in classAbstractLifecycleComponent
-
stopInternal
protected abstract void stopInternal()Called to tear down internal resources -
onException
-
onServerException
-
serverAcceptedChannel
-
incomingRequest
This method handles an incoming http request.- Parameters:
httpRequest
- that is incominghttpChannel
- that received the http request
-