public abstract class AbstractPeer extends Object implements Endpoint, ChannelHandler
| 构造器和说明 |
|---|
AbstractPeer(URL url,
ChannelHandler handler) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
caught(Channel ch,
Throwable ex)
on exception caught.
|
void |
close()
close the channel.
|
void |
close(int timeout)
Graceful close the channel.
|
void |
connected(Channel ch)
on channel connected.
|
void |
disconnected(Channel ch)
on channel disconnected.
|
ChannelHandler |
getChannelHandler()
get channel handler.
|
ChannelHandler |
getDelegateHandler()
Return the final handler (which may have been wrapped).
|
ChannelHandler |
getHandler()
已过时。
|
URL |
getUrl()
get url.
|
boolean |
isClosed()
is closed.
|
boolean |
isClosing() |
void |
received(Channel ch,
Object msg)
on message received.
|
void |
send(Object message)
send message.
|
void |
sent(Channel ch,
Object msg)
on message sent.
|
void |
startClose() |
getLocalAddress, sendpublic AbstractPeer(URL url, ChannelHandler handler)
public void send(Object message) throws RemotingException
Endpointsend 在接口中 EndpointRemotingExceptionpublic void close(int timeout)
Endpointpublic void startClose()
startClose 在接口中 Endpointpublic ChannelHandler getChannelHandler()
EndpointgetChannelHandler 在接口中 Endpoint@Deprecated public ChannelHandler getHandler()
public ChannelHandler getDelegateHandler()
public boolean isClosed()
Endpointpublic boolean isClosing()
public void connected(Channel ch) throws RemotingException
ChannelHandlerconnected 在接口中 ChannelHandlerch - channel.RemotingExceptionpublic void disconnected(Channel ch) throws RemotingException
ChannelHandlerdisconnected 在接口中 ChannelHandlerch - channel.RemotingExceptionpublic void sent(Channel ch, Object msg) throws RemotingException
ChannelHandlersent 在接口中 ChannelHandlerch - channel.msg - message.RemotingExceptionpublic void received(Channel ch, Object msg) throws RemotingException
ChannelHandlerreceived 在接口中 ChannelHandlerch - channel.msg - message.RemotingExceptionpublic void caught(Channel ch, Throwable ex) throws RemotingException
ChannelHandlercaught 在接口中 ChannelHandlerch - channel.ex - exception.RemotingExceptionCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.