Package io.netty.channel.socket
Interface DuplexChannel
- All Superinterfaces:
AttributeMap
,Channel
,ChannelOutboundInvoker
,Comparable<Channel>
- All Known Subinterfaces:
DomainSocketChannel
,SocketChannel
- All Known Implementing Classes:
AbstractEpollStreamChannel
,AbstractKQueueStreamChannel
,EpollDomainSocketChannel
,EpollSocketChannel
,KQueueDomainSocketChannel
,KQueueSocketChannel
,NioSocketChannel
,OioSocketChannel
A duplex
Channel
that has two sides that can be shutdown independently.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.Channel
Channel.Unsafe
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if and only if the remote peer shut down its output so that no more data is received from this channel.boolean
boolean
Determine if both the input and output of this channel have been shutdown.shutdown()
Will shutdown the input and output sides of this channel.shutdown
(ChannelPromise promise) Will shutdown the input and output sides of this channel.shutdownInput
(ChannelPromise promise) Will shutdown the input and notifyChannelPromise
.shutdownOutput
(ChannelPromise promise) Will shutdown the output and notifyChannelPromise
.Methods inherited from interface io.netty.util.AttributeMap
attr, hasAttr
Methods inherited from interface io.netty.channel.Channel
alloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, config, eventLoop, flush, id, isActive, isOpen, isRegistered, isWritable, localAddress, metadata, parent, pipeline, read, remoteAddress, unsafe
Methods inherited from interface io.netty.channel.ChannelOutboundInvoker
bind, bind, close, close, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, voidPromise, write, write, writeAndFlush, writeAndFlush
Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
isInputShutdown
boolean isInputShutdown()Returnstrue
if and only if the remote peer shut down its output so that no more data is received from this channel. Note that the semantic of this method is different from that ofSocket.shutdownInput()
andSocket.isInputShutdown()
. -
shutdownInput
ChannelFuture shutdownInput()- See Also:
-
shutdownInput
Will shutdown the input and notifyChannelPromise
.- See Also:
-
isOutputShutdown
boolean isOutputShutdown()- See Also:
-
shutdownOutput
ChannelFuture shutdownOutput()- See Also:
-
shutdownOutput
Will shutdown the output and notifyChannelPromise
.- See Also:
-
isShutdown
boolean isShutdown()Determine if both the input and output of this channel have been shutdown. -
shutdown
ChannelFuture shutdown()Will shutdown the input and output sides of this channel.- Returns:
- will be completed when both shutdown operations complete.
-
shutdown
Will shutdown the input and output sides of this channel.- Parameters:
promise
- will be completed when both shutdown operations complete.- Returns:
- will be completed when both shutdown operations complete.
-