Package org.opensearch.transport.nio
Class MockNioTransport
java.lang.Object
org.opensearch.common.component.AbstractLifecycleComponent
org.opensearch.transport.TcpTransport
org.opensearch.transport.nio.MockNioTransport
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.opensearch.common.component.LifecycleComponent,org.opensearch.common.lease.Releasable,org.opensearch.transport.Transport
public class MockNioTransport
extends org.opensearch.transport.TcpTransport
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensearch.transport.TcpTransport
org.opensearch.transport.TcpTransport.HttpRequestOnTransportException, org.opensearch.transport.TcpTransport.NodeChannels, org.opensearch.transport.TcpTransport.ProfileSettingsNested classes/interfaces inherited from interface org.opensearch.transport.Transport
org.opensearch.transport.Transport.Connection, org.opensearch.transport.Transport.RequestHandlers, org.opensearch.transport.Transport.ResponseContext<T extends org.opensearch.transport.TransportResponse>, org.opensearch.transport.Transport.ResponseHandlers -
Field Summary
-
Constructor Summary
Constructors Constructor Description MockNioTransport(org.opensearch.common.settings.Settings settings, org.opensearch.Version version, org.opensearch.threadpool.ThreadPool threadPool, org.opensearch.common.network.NetworkService networkService, org.opensearch.common.util.PageCacheRecycler pageCacheRecycler, org.opensearch.common.io.stream.NamedWriteableRegistry namedWriteableRegistry, org.opensearch.indices.breaker.CircuitBreakerService circuitBreakerService) -
Method Summary
Modifier and Type Method Description protected org.opensearch.transport.nio.MockNioTransport.MockServerChannelbind(java.lang.String name, java.net.InetSocketAddress address)protected voiddoStart()protected org.opensearch.transport.nio.MockNioTransport.MockSocketChannelinitiateChannel(org.opensearch.cluster.node.DiscoveryNode node)protected org.opensearch.transport.ConnectionProfilemaybeOverrideConnectionProfile(org.opensearch.transport.ConnectionProfile connectionProfile)protected voidstopInternal()Methods inherited from class org.opensearch.transport.TcpTransport
addressesFromString, bindServer, boundAddress, doClose, doStop, executeHandshake, getDefaultSeedAddresses, getInflightBreaker, getProfileSettings, getRequestHandlers, getResponseHandlers, getStats, getStatsTracker, getThreadPool, getVersion, inboundMessage, onException, onServerException, openConnection, profileBoundAddresses, readMessageLength, serverAcceptedChannel, setMessageListener, setSlowLogThresholdMethods inherited from class org.opensearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
MockNioTransport
public MockNioTransport(org.opensearch.common.settings.Settings settings, org.opensearch.Version version, org.opensearch.threadpool.ThreadPool threadPool, org.opensearch.common.network.NetworkService networkService, org.opensearch.common.util.PageCacheRecycler pageCacheRecycler, org.opensearch.common.io.stream.NamedWriteableRegistry namedWriteableRegistry, org.opensearch.indices.breaker.CircuitBreakerService circuitBreakerService)
-
-
Method Details
-
bind
protected org.opensearch.transport.nio.MockNioTransport.MockServerChannel bind(java.lang.String name, java.net.InetSocketAddress address) throws java.io.IOException- Specified by:
bindin classorg.opensearch.transport.TcpTransport- Throws:
java.io.IOException
-
initiateChannel
protected org.opensearch.transport.nio.MockNioTransport.MockSocketChannel initiateChannel(org.opensearch.cluster.node.DiscoveryNode node) throws java.io.IOException- Specified by:
initiateChannelin classorg.opensearch.transport.TcpTransport- Throws:
java.io.IOException
-
doStart
protected void doStart()- Overrides:
doStartin classorg.opensearch.transport.TcpTransport
-
stopInternal
protected void stopInternal()- Specified by:
stopInternalin classorg.opensearch.transport.TcpTransport
-
maybeOverrideConnectionProfile
protected org.opensearch.transport.ConnectionProfile maybeOverrideConnectionProfile(org.opensearch.transport.ConnectionProfile connectionProfile)- Overrides:
maybeOverrideConnectionProfilein classorg.opensearch.transport.TcpTransport
-