Class AbstractPeer
java.lang.Object
org.apache.dubbo.remoting.transport.AbstractPeer
- All Implemented Interfaces:
ChannelHandler
,Endpoint
- Direct Known Subclasses:
AbstractChannel
,AbstractEndpoint
AbstractPeer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
on exception caught.void
close()
close the channel.void
close
(int timeout) Graceful close the channel.void
on channel connected.void
disconnected
(Channel ch) on channel disconnected.get channel handler.Return the final handler (which may have been wrapped).Deprecated.getUrl()
get url.boolean
isClosed()
is closed.boolean
void
on message received.void
send message.void
on message sent.void
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.dubbo.remoting.Endpoint
getLocalAddress, send
-
Constructor Details
-
AbstractPeer
-
-
Method Details
-
send
Description copied from interface:Endpoint
send message.- Specified by:
send
in interfaceEndpoint
- Parameters:
message
-- Throws:
RemotingException
-
close
public void close()Description copied from interface:Endpoint
close the channel. -
close
public void close(int timeout) Description copied from interface:Endpoint
Graceful close the channel. -
startClose
public void startClose()- Specified by:
startClose
in interfaceEndpoint
-
getUrl
Description copied from interface:Endpoint
get url. -
getChannelHandler
Description copied from interface:Endpoint
get channel handler.- Specified by:
getChannelHandler
in interfaceEndpoint
- Returns:
- channel handler
-
getHandler
Deprecated.- Returns:
- ChannelHandler
-
getDelegateHandler
Return the final handler (which may have been wrapped). This method should be distinguished with getChannelHandler() method- Returns:
- ChannelHandler
-
isClosed
public boolean isClosed()Description copied from interface:Endpoint
is closed. -
isClosing
public boolean isClosing() -
connected
Description copied from interface:ChannelHandler
on channel connected.- Specified by:
connected
in interfaceChannelHandler
- Parameters:
ch
- channel.- Throws:
RemotingException
-
disconnected
Description copied from interface:ChannelHandler
on channel disconnected.- Specified by:
disconnected
in interfaceChannelHandler
- Parameters:
ch
- channel.- Throws:
RemotingException
-
sent
Description copied from interface:ChannelHandler
on message sent.- Specified by:
sent
in interfaceChannelHandler
- Parameters:
ch
- channel.msg
- message.- Throws:
RemotingException
-
received
Description copied from interface:ChannelHandler
on message received.- Specified by:
received
in interfaceChannelHandler
- Parameters:
ch
- channel.msg
- message.- Throws:
RemotingException
-
caught
Description copied from interface:ChannelHandler
on exception caught.- Specified by:
caught
in interfaceChannelHandler
- Parameters:
ch
- channel.ex
- exception.- Throws:
RemotingException
-