Package org.elasticsearch.common.network
Class NetworkModule
java.lang.Object
org.elasticsearch.common.network.NetworkModule
public final class NetworkModule
extends java.lang.Object
A module to handle registering and binding all network related classes.
-
Field Summary
Fields Modifier and Type Field Description static Setting<java.lang.String>HTTP_DEFAULT_TYPE_SETTINGstatic java.lang.StringHTTP_TYPE_DEFAULT_KEYstatic java.lang.StringHTTP_TYPE_KEYstatic Setting<java.lang.String>HTTP_TYPE_SETTINGstatic Setting<java.lang.String>TRANSPORT_DEFAULT_TYPE_SETTINGstatic java.lang.StringTRANSPORT_TYPE_DEFAULT_KEYstatic java.lang.StringTRANSPORT_TYPE_KEYstatic Setting<java.lang.String>TRANSPORT_TYPE_SETTING -
Constructor Summary
Constructors Constructor Description NetworkModule(Settings settings, boolean transportClient, java.util.List<NetworkPlugin> plugins, ThreadPool threadPool, BigArrays bigArrays, PageCacheRecycler pageCacheRecycler, CircuitBreakerService circuitBreakerService, NamedWriteableRegistry namedWriteableRegistry, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, NetworkService networkService, HttpServerTransport.Dispatcher dispatcher, ClusterSettings clusterSettings)Creates a network module that custom networking classes can be plugged into. -
Method Summary
Modifier and Type Method Description java.util.function.Supplier<HttpServerTransport>getHttpServerTransportSupplier()static java.util.List<NamedWriteableRegistry.Entry>getNamedWriteables()static java.util.List<org.elasticsearch.common.xcontent.NamedXContentRegistry.Entry>getNamedXContents()TransportInterceptorgetTransportInterceptor()Returns a compositeTransportInterceptorcontaining all registered interceptorsjava.util.function.Supplier<Transport>getTransportSupplier()booleanisTransportClient()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
TRANSPORT_TYPE_KEY
public static final java.lang.String TRANSPORT_TYPE_KEY- See Also:
- Constant Field Values
-
HTTP_TYPE_KEY
public static final java.lang.String HTTP_TYPE_KEY- See Also:
- Constant Field Values
-
HTTP_TYPE_DEFAULT_KEY
public static final java.lang.String HTTP_TYPE_DEFAULT_KEY- See Also:
- Constant Field Values
-
TRANSPORT_TYPE_DEFAULT_KEY
public static final java.lang.String TRANSPORT_TYPE_DEFAULT_KEY- See Also:
- Constant Field Values
-
TRANSPORT_DEFAULT_TYPE_SETTING
-
HTTP_DEFAULT_TYPE_SETTING
-
HTTP_TYPE_SETTING
-
TRANSPORT_TYPE_SETTING
-
-
Constructor Details
-
NetworkModule
public NetworkModule(Settings settings, boolean transportClient, java.util.List<NetworkPlugin> plugins, ThreadPool threadPool, BigArrays bigArrays, PageCacheRecycler pageCacheRecycler, CircuitBreakerService circuitBreakerService, NamedWriteableRegistry namedWriteableRegistry, org.elasticsearch.common.xcontent.NamedXContentRegistry xContentRegistry, NetworkService networkService, HttpServerTransport.Dispatcher dispatcher, ClusterSettings clusterSettings)Creates a network module that custom networking classes can be plugged into.- Parameters:
settings- The settings for the nodetransportClient- True if only transport classes should be allowed to be registered, false otherwise.
-
-
Method Details
-
isTransportClient
public boolean isTransportClient() -
getNamedWriteables
-
getNamedXContents
public static java.util.List<org.elasticsearch.common.xcontent.NamedXContentRegistry.Entry> getNamedXContents() -
getHttpServerTransportSupplier
-
getTransportSupplier
-
getTransportInterceptor
Returns a compositeTransportInterceptorcontaining all registered interceptors- See Also:
registerTransportInterceptor(TransportInterceptor)
-