|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.alibaba.dubbo.remoting.transport.AbstractPeer
public abstract class AbstractPeer
AbstractPeer
| Constructor Summary | |
|---|---|
AbstractPeer(URL url,
ChannelHandler handler)
|
|
| Method Summary | |
|---|---|
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()
返回最终的handler,可能已被wrap,需要区别于getChannelHandler |
ChannelHandler |
getHandler()
Deprecated. |
URL |
getUrl()
get url. |
boolean |
isClosed()
is closed. |
void |
received(Channel ch,
Object msg)
on message received. |
void |
send(Object message)
send message. |
void |
sent(Channel ch,
Object msg)
on message sent. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.alibaba.dubbo.remoting.Endpoint |
|---|
getLocalAddress, send |
| Constructor Detail |
|---|
public AbstractPeer(URL url,
ChannelHandler handler)
| Method Detail |
|---|
public void send(Object message)
throws RemotingException
Endpoint
send in interface EndpointRemotingExceptionpublic void close()
Endpoint
close in interface Endpointpublic void close(int timeout)
Endpoint
close in interface Endpointpublic URL getUrl()
Endpoint
getUrl in interface Endpointpublic ChannelHandler getChannelHandler()
Endpoint
getChannelHandler in interface Endpoint@Deprecated public ChannelHandler getHandler()
public ChannelHandler getDelegateHandler()
public boolean isClosed()
Endpoint
isClosed in interface Endpoint
public void connected(Channel ch)
throws RemotingException
ChannelHandler
connected in interface ChannelHandlerch - channel.
RemotingException
public void disconnected(Channel ch)
throws RemotingException
ChannelHandler
disconnected in interface ChannelHandlerch - channel.
RemotingException
public void sent(Channel ch,
Object msg)
throws RemotingException
ChannelHandler
sent in interface ChannelHandlerch - channel.msg - message.
RemotingException
public void received(Channel ch,
Object msg)
throws RemotingException
ChannelHandler
received in interface ChannelHandlerch - channel.msg - message.
RemotingException
public void caught(Channel ch,
Throwable ex)
throws RemotingException
ChannelHandler
caught in interface ChannelHandlerch - channel.ex - exception.
RemotingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||