Class AbstractPeer
java.lang.Object
org.apache.dubbo.remoting.transport.AbstractPeer
- All Implemented Interfaces:
ChannelHandler,Endpoint
- Direct Known Subclasses:
AbstractChannel,AbstractEndpoint
AbstractPeer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidon exception caught.voidclose()close the channel.voidclose(int timeout) Graceful close the channel.voidon channel connected.voiddisconnected(Channel ch) on channel disconnected.get channel handler.Return the final handler (which may have been wrapped).Deprecated.getUrl()get url.booleanisClosed()is closed.booleanvoidon message received.voidsend message.voidon message sent.voidMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.dubbo.remoting.Endpoint
getLocalAddress, send
-
Constructor Details
-
AbstractPeer
-
-
Method Details
-
send
Description copied from interface:Endpointsend message.- Specified by:
sendin interfaceEndpoint- Parameters:
message-- Throws:
RemotingException
-
close
public void close()Description copied from interface:Endpointclose the channel. -
close
public void close(int timeout) Description copied from interface:EndpointGraceful close the channel. -
startClose
public void startClose()- Specified by:
startClosein interfaceEndpoint
-
getUrl
Description copied from interface:Endpointget url. -
getChannelHandler
Description copied from interface:Endpointget channel handler.- Specified by:
getChannelHandlerin 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:Endpointis closed. -
isClosing
public boolean isClosing() -
connected
Description copied from interface:ChannelHandleron channel connected.- Specified by:
connectedin interfaceChannelHandler- Parameters:
ch- channel.- Throws:
RemotingException
-
disconnected
Description copied from interface:ChannelHandleron channel disconnected.- Specified by:
disconnectedin interfaceChannelHandler- Parameters:
ch- channel.- Throws:
RemotingException
-
sent
Description copied from interface:ChannelHandleron message sent.- Specified by:
sentin interfaceChannelHandler- Parameters:
ch- channel.msg- message.- Throws:
RemotingException
-
received
Description copied from interface:ChannelHandleron message received.- Specified by:
receivedin interfaceChannelHandler- Parameters:
ch- channel.msg- message.- Throws:
RemotingException
-
caught
Description copied from interface:ChannelHandleron exception caught.- Specified by:
caughtin interfaceChannelHandler- Parameters:
ch- channel.ex- exception.- Throws:
RemotingException
-