Class AbstractServer
java.lang.Object
org.apache.dubbo.remoting.transport.AbstractPeer
org.apache.dubbo.remoting.transport.AbstractEndpoint
org.apache.dubbo.remoting.transport.AbstractServer
- All Implemented Interfaces:
Resetable
,ChannelHandler
,Endpoint
,IdleSensible
,RemotingServer
- Direct Known Subclasses:
AbstractPortUnificationServer
AbstractServer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
close the channel.void
close
(int timeout) Graceful close the channel.void
on channel connected.void
disconnected
(Channel ch) on channel disconnected.int
get local address.void
void
send message.Methods inherited from class org.apache.dubbo.remoting.transport.AbstractEndpoint
reset
Methods inherited from class org.apache.dubbo.remoting.transport.AbstractPeer
caught, getChannelHandler, getDelegateHandler, getHandler, getUrl, isClosed, isClosing, received, send, sent, startClose
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
getChannelHandler, getUrl, isClosed, send, startClose
Methods inherited from interface org.apache.dubbo.remoting.IdleSensible
canHandleIdle
Methods inherited from interface org.apache.dubbo.remoting.RemotingServer
getChannel, getChannels, isBound, reset
-
Constructor Details
-
AbstractServer
- Throws:
RemotingException
-
-
Method Details
-
reset
- Specified by:
reset
in interfaceResetable
- Overrides:
reset
in classAbstractEndpoint
-
send
Description copied from interface:Endpoint
send message.- Specified by:
send
in interfaceEndpoint
sent
- already sent to socket?- Throws:
RemotingException
-
close
public void close()Description copied from interface:Endpoint
close the channel.- Specified by:
close
in interfaceEndpoint
- Overrides:
close
in classAbstractPeer
-
close
public void close(int timeout) Description copied from interface:Endpoint
Graceful close the channel.- Specified by:
close
in interfaceEndpoint
- Overrides:
close
in classAbstractPeer
-
getLocalAddress
Description copied from interface:Endpoint
get local address.- Specified by:
getLocalAddress
in interfaceEndpoint
- Returns:
- local address.
-
getBindAddress
-
getAccepts
public int getAccepts() -
connected
Description copied from interface:ChannelHandler
on channel connected.- Specified by:
connected
in interfaceChannelHandler
- Overrides:
connected
in classAbstractPeer
- Parameters:
ch
- channel.- Throws:
RemotingException
-
disconnected
Description copied from interface:ChannelHandler
on channel disconnected.- Specified by:
disconnected
in interfaceChannelHandler
- Overrides:
disconnected
in classAbstractPeer
- Parameters:
ch
- channel.- Throws:
RemotingException
-