|
||||||||||
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. |
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()
|
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 Endpoint
RemotingException
public void close()
Endpoint
close
in interface Endpoint
public void close(int timeout)
Endpoint
close
in interface Endpoint
public void startClose()
startClose
in interface Endpoint
public URL getUrl()
Endpoint
getUrl
in interface Endpoint
public ChannelHandler getChannelHandler()
Endpoint
getChannelHandler
in interface Endpoint
@Deprecated public ChannelHandler getHandler()
public ChannelHandler getDelegateHandler()
public boolean isClosed()
Endpoint
isClosed
in interface Endpoint
public boolean isClosing()
public void connected(Channel ch) throws RemotingException
ChannelHandler
connected
in interface ChannelHandler
ch
- channel.
RemotingException
public void disconnected(Channel ch) throws RemotingException
ChannelHandler
disconnected
in interface ChannelHandler
ch
- channel.
RemotingException
public void sent(Channel ch, Object msg) throws RemotingException
ChannelHandler
sent
in interface ChannelHandler
ch
- channel.msg
- message.
RemotingException
public void received(Channel ch, Object msg) throws RemotingException
ChannelHandler
received
in interface ChannelHandler
ch
- channel.msg
- message.
RemotingException
public void caught(Channel ch, Throwable ex) throws RemotingException
ChannelHandler
caught
in interface ChannelHandler
ch
- channel.ex
- exception.
RemotingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |