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_SETTING
static Setting<java.lang.Boolean>
HTTP_ENABLED
static java.lang.String
HTTP_TYPE_DEFAULT_KEY
static java.lang.String
HTTP_TYPE_KEY
static Setting<java.lang.String>
HTTP_TYPE_SETTING
static Setting<java.lang.String>
TRANSPORT_DEFAULT_TYPE_SETTING
static java.lang.String
TRANSPORT_TYPE_DEFAULT_KEY
static java.lang.String
TRANSPORT_TYPE_KEY
static 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, NamedXContentRegistry xContentRegistry, NetworkService networkService, HttpServerTransport.Dispatcher dispatcher)
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<NamedXContentRegistry.Entry>
getNamedXContents()
TransportInterceptor
getTransportInterceptor()
Returns a compositeTransportInterceptor
containing all registered interceptorsjava.util.function.Supplier<Transport>
getTransportSupplier()
boolean
isHttpEnabled()
boolean
isTransportClient()
-
-
-
Field Detail
-
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
public static final Setting<java.lang.String> TRANSPORT_DEFAULT_TYPE_SETTING
-
HTTP_DEFAULT_TYPE_SETTING
public static final Setting<java.lang.String> HTTP_DEFAULT_TYPE_SETTING
-
HTTP_TYPE_SETTING
public static final Setting<java.lang.String> HTTP_TYPE_SETTING
-
HTTP_ENABLED
public static final Setting<java.lang.Boolean> HTTP_ENABLED
-
TRANSPORT_TYPE_SETTING
public static final Setting<java.lang.String> TRANSPORT_TYPE_SETTING
-
-
Constructor Detail
-
NetworkModule
public NetworkModule(Settings settings, boolean transportClient, java.util.List<NetworkPlugin> plugins, ThreadPool threadPool, BigArrays bigArrays, PageCacheRecycler pageCacheRecycler, CircuitBreakerService circuitBreakerService, NamedWriteableRegistry namedWriteableRegistry, NamedXContentRegistry xContentRegistry, NetworkService networkService, HttpServerTransport.Dispatcher dispatcher)
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 Detail
-
isTransportClient
public boolean isTransportClient()
-
getNamedWriteables
public static java.util.List<NamedWriteableRegistry.Entry> getNamedWriteables()
-
getNamedXContents
public static java.util.List<NamedXContentRegistry.Entry> getNamedXContents()
-
getHttpServerTransportSupplier
public java.util.function.Supplier<HttpServerTransport> getHttpServerTransportSupplier()
-
isHttpEnabled
public boolean isHttpEnabled()
-
getTransportSupplier
public java.util.function.Supplier<Transport> getTransportSupplier()
-
getTransportInterceptor
public TransportInterceptor getTransportInterceptor()
Returns a compositeTransportInterceptor
containing all registered interceptors- See Also:
registerTransportInterceptor(TransportInterceptor)
-
-