Class Netty4TcpChannel
java.lang.Object
org.elasticsearch.transport.netty4.Netty4TcpChannel
- All Implemented Interfaces:
Closeable,AutoCloseable,org.elasticsearch.common.network.CloseableChannel,org.elasticsearch.transport.TcpChannel
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.transport.TcpChannel
org.elasticsearch.transport.TcpChannel.ChannelStats -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCloseListener(org.elasticsearch.action.ActionListener<Void> listener) voidaddConnectListener(org.elasticsearch.action.ActionListener<Void> listener) static voidaddListener(io.netty.channel.ChannelFuture channelFuture, org.elasticsearch.core.CompletableContext<Void> context) Adds a listener that completes the givenCompletableContextto the givenChannelFuture.static io.netty.channel.ChannelPromiseaddPromise(org.elasticsearch.action.ActionListener<Void> listener, io.netty.channel.Channel channel) Creates aChannelPromisefor the givenChanneland adds a listener that invokes the givenActionListeneron its completion.voidclose()org.elasticsearch.transport.TcpChannel.ChannelStatsio.netty.channel.ChannelbooleanisOpen()booleanvoidsendMessage(org.elasticsearch.common.bytes.BytesReference reference, org.elasticsearch.action.ActionListener<Void> listener) toString()
-
Method Details
-
addListener
public static void addListener(io.netty.channel.ChannelFuture channelFuture, org.elasticsearch.core.CompletableContext<Void> context) Adds a listener that completes the givenCompletableContextto the givenChannelFuture.- Parameters:
channelFuture- Channel futurecontext- Context to complete
-
addPromise
public static io.netty.channel.ChannelPromise addPromise(org.elasticsearch.action.ActionListener<Void> listener, io.netty.channel.Channel channel) Creates aChannelPromisefor the givenChanneland adds a listener that invokes the givenActionListeneron its completion.- Parameters:
listener- lister to invokechannel- channel- Returns:
- write promise
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.common.network.CloseableChannel
-
isServerChannel
public boolean isServerChannel()- Specified by:
isServerChannelin interfaceorg.elasticsearch.transport.TcpChannel
-
getProfile
- Specified by:
getProfilein interfaceorg.elasticsearch.transport.TcpChannel
-
addCloseListener
- Specified by:
addCloseListenerin interfaceorg.elasticsearch.common.network.CloseableChannel
-
addConnectListener
- Specified by:
addConnectListenerin interfaceorg.elasticsearch.transport.TcpChannel
-
getChannelStats
public org.elasticsearch.transport.TcpChannel.ChannelStats getChannelStats()- Specified by:
getChannelStatsin interfaceorg.elasticsearch.transport.TcpChannel
-
isOpen
public boolean isOpen()- Specified by:
isOpenin interfaceorg.elasticsearch.common.network.CloseableChannel
-
getLocalAddress
- Specified by:
getLocalAddressin interfaceorg.elasticsearch.transport.TcpChannel
-
getRemoteAddress
- Specified by:
getRemoteAddressin interfaceorg.elasticsearch.transport.TcpChannel
-
sendMessage
public void sendMessage(org.elasticsearch.common.bytes.BytesReference reference, org.elasticsearch.action.ActionListener<Void> listener) - Specified by:
sendMessagein interfaceorg.elasticsearch.transport.TcpChannel
-
getNettyChannel
public io.netty.channel.Channel getNettyChannel() -
toString
-