类 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)
-
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 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()
-
从接口继承的方法 com.alibaba.dubbo.remoting.Endpoint
getLocalAddress, send
-
-
-
-
构造器详细资料
-
AbstractPeer
public AbstractPeer(URL url, ChannelHandler handler)
-
-
方法详细资料
-
send
public void send(Object message) throws RemotingException
从接口复制的说明:Endpoint
send message.- 指定者:
send
在接口中Endpoint
- 抛出:
RemotingException
-
close
public void close(int timeout)
从接口复制的说明:Endpoint
Graceful close the channel.
-
startClose
public void startClose()
- 指定者:
startClose
在接口中Endpoint
-
getChannelHandler
public ChannelHandler getChannelHandler()
从接口复制的说明:Endpoint
get 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()
从接口复制的说明:Endpoint
is closed.
-
isClosing
public boolean isClosing()
-
connected
public void connected(Channel ch) throws RemotingException
从接口复制的说明:ChannelHandler
on channel connected.- 指定者:
connected
在接口中ChannelHandler
- 参数:
ch
- channel.- 抛出:
RemotingException
-
disconnected
public void disconnected(Channel ch) throws RemotingException
从接口复制的说明:ChannelHandler
on channel disconnected.- 指定者:
disconnected
在接口中ChannelHandler
- 参数:
ch
- channel.- 抛出:
RemotingException
-
sent
public void sent(Channel ch, Object msg) throws RemotingException
从接口复制的说明:ChannelHandler
on message sent.- 指定者:
sent
在接口中ChannelHandler
- 参数:
ch
- channel.msg
- message.- 抛出:
RemotingException
-
received
public void received(Channel ch, Object msg) throws RemotingException
从接口复制的说明:ChannelHandler
on message received.- 指定者:
received
在接口中ChannelHandler
- 参数:
ch
- channel.msg
- message.- 抛出:
RemotingException
-
caught
public void caught(Channel ch, Throwable ex) throws RemotingException
从接口复制的说明:ChannelHandler
on exception caught.- 指定者:
caught
在接口中ChannelHandler
- 参数:
ch
- channel.ex
- exception.- 抛出:
RemotingException
-
-