public interface RemotingChannel
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Requests to close the
RemotingChannel immediately. |
void |
close(ChannelListener listener)
Requests to close the
RemotingChannel immediately. |
boolean |
isActive() |
boolean |
isWritable() |
SocketAddress |
localAddress()
Returns the local address where this
RemotingChannel is bound to. |
SocketAddress |
remoteAddress()
Returns the remote address where this
RemotingChannel is connected to. |
void |
reply(RemotingCommand command)
Writes a response
RemotingCommand to remote. |
void |
reply(RemotingCommand command,
ChannelListener listener)
Writes a response
RemotingCommand to remote. |
SocketAddress localAddress()
RemotingChannel is bound to. The returned
SocketAddress is supposed to be down-cast into more concrete
type such as InetSocketAddress to retrieve the detailed
information.null if this channel is not bound.SocketAddress remoteAddress()
RemotingChannel is connected to. The
returned SocketAddress is supposed to be down-cast into more
concrete type such as InetSocketAddress to retrieve the detailed
information.null if this channel is not connected.boolean isWritable()
true if and only if the I/O thread will perform the
requested write operation immediately. Any write requests made when
this method returns false are queued until the I/O thread is
ready to process the queued write requests.boolean isActive()
true if the RemotingChannel is active and so connected.void close()
RemotingChannel immediately.void close(ChannelListener listener)
RemotingChannel immediately.listener - channel listenervoid reply(RemotingCommand command)
RemotingCommand to remote.command - the response commandvoid reply(RemotingCommand command, ChannelListener listener)
RemotingCommand to remote.command - the response commandlistener - channel listenerCopyright © 2021–2022. All rights reserved.