类 AbstractPeer
- java.lang.Object
-
- com.alibaba.dubbo.remoting.transport.AbstractPeer
-
- 所有已实现的接口:
ChannelHandler,Endpoint
- 直接已知子类:
AbstractChannel,AbstractEndpoint
public abstract class AbstractPeer extends Object implements Endpoint, ChannelHandler
AbstractPeer
-
-
构造器概要
构造器 构造器 说明 AbstractPeer(URL url, ChannelHandler handler)
-
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 voidcaught(Channel ch, Throwable ex)on exception caught.voidclose()close the channel.voidclose(int timeout)Graceful close the channel.voidconnected(Channel ch)on channel connected.voiddisconnected(Channel ch)on channel disconnected.ChannelHandlergetChannelHandler()get channel handler.ChannelHandlergetDelegateHandler()Return the final handler (which may have been wrapped).ChannelHandlergetHandler()已过时。URLgetUrl()get url.booleanisClosed()is closed.booleanisClosing()voidreceived(Channel ch, Object msg)on message received.voidsend(Object message)send message.voidsent(Channel ch, Object msg)on message sent.voidstartClose()-
从接口继承的方法 com.alibaba.dubbo.remoting.Endpoint
getLocalAddress, send
-
-
-
-
构造器详细资料
-
AbstractPeer
public AbstractPeer(URL url, ChannelHandler handler)
-
-
方法详细资料
-
send
public void send(Object message) throws RemotingException
从接口复制的说明:Endpointsend message.- 指定者:
send在接口中Endpoint- 抛出:
RemotingException
-
close
public void close(int timeout)
从接口复制的说明:EndpointGraceful close the channel.
-
startClose
public void startClose()
- 指定者:
startClose在接口中Endpoint
-
getChannelHandler
public ChannelHandler getChannelHandler()
从接口复制的说明:Endpointget channel handler.- 指定者:
getChannelHandler在接口中Endpoint- 返回:
- channel handler
-
getHandler
@Deprecated public ChannelHandler getHandler()
已过时。- 返回:
- ChannelHandler
-
getDelegateHandler
public ChannelHandler getDelegateHandler()
Return the final handler (which may have been wrapped). This method should be distinguished with getChannelHandler() method- 返回:
- ChannelHandler
-
isClosed
public boolean isClosed()
从接口复制的说明:Endpointis closed.
-
isClosing
public boolean isClosing()
-
connected
public void connected(Channel ch) throws RemotingException
从接口复制的说明:ChannelHandleron channel connected.- 指定者:
connected在接口中ChannelHandler- 参数:
ch- channel.- 抛出:
RemotingException
-
disconnected
public void disconnected(Channel ch) throws RemotingException
从接口复制的说明:ChannelHandleron channel disconnected.- 指定者:
disconnected在接口中ChannelHandler- 参数:
ch- channel.- 抛出:
RemotingException
-
sent
public void sent(Channel ch, Object msg) throws RemotingException
从接口复制的说明:ChannelHandleron message sent.- 指定者:
sent在接口中ChannelHandler- 参数:
ch- channel.msg- message.- 抛出:
RemotingException
-
received
public void received(Channel ch, Object msg) throws RemotingException
从接口复制的说明:ChannelHandleron message received.- 指定者:
received在接口中ChannelHandler- 参数:
ch- channel.msg- message.- 抛出:
RemotingException
-
caught
public void caught(Channel ch, Throwable ex) throws RemotingException
从接口复制的说明:ChannelHandleron exception caught.- 指定者:
caught在接口中ChannelHandler- 参数:
ch- channel.ex- exception.- 抛出:
RemotingException
-
-