Package org.elasticsearch.http
Class AbstractHttpServerTransport
java.lang.Object
org.elasticsearch.common.component.AbstractLifecycleComponent
org.elasticsearch.http.AbstractHttpServerTransport
- All Implemented Interfaces:
Closeable,AutoCloseable,LifecycleComponent,org.elasticsearch.core.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.DispatcherNested classes/interfaces inherited from interface org.elasticsearch.node.ReportingService
ReportingService.Info -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BigArraysprotected CorsHandlerprotected HttpServerTransport.Dispatcherprotected longprotected ByteSizeValueprotected NetworkServiceprotected PortsRangeprotected Settingsprotected ThreadPoolFields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycleFields inherited from interface org.elasticsearch.http.HttpServerTransport
HTTP_SERVER_WORKER_THREAD_NAME_PREFIX -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractHttpServerTransport(Settings settings, NetworkService networkService, BigArrays bigArrays, ThreadPool threadPool, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, HttpServerTransport.Dispatcher dispatcher, ClusterSettings clusterSettings) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract HttpServerChannelbind(InetSocketAddress hostAddress)protected voidprotected voiddoClose()protected voiddoStop()voidincomingRequest(HttpRequest httpRequest, HttpChannel httpChannel)This method handles an incoming http request.info()voidonException(HttpChannel channel, Exception e)protected voidonServerException(HttpServerChannel channel, Exception e)protected voidserverAcceptedChannel(HttpChannel httpChannel)stats()protected abstract voidCalled to tear down internal resourcesMethods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, doStart, lifecycleState, removeLifecycleListener, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.common.component.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stopMethods inherited from interface org.elasticsearch.core.Releasable
close
-
Field Details
-
settings
-
handlingSettings
-
networkService
-
bigArrays
-
threadPool
-
dispatcher
-
corsHandler
-
port
-
maxContentLength
-
lastClientStatsPruneTime
protected volatile long lastClientStatsPruneTime
-
-
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:
boundAddressin interfaceHttpServerTransport
-
info
- Specified by:
infoin interfaceHttpServerTransport- Specified by:
infoin interfaceReportingService<HttpInfo>
-
stats
- Specified by:
statsin interfaceHttpServerTransport
-
bindServer
protected void bindServer() -
bind
- Throws:
Exception
-
doStop
protected void doStop()- Specified by:
doStopin classAbstractLifecycleComponent
-
doClose
protected void doClose()- Specified by:
doClosein 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
-