Class AbstractNettyConnectionClient
java.lang.Object
org.apache.dubbo.remoting.transport.AbstractPeer
org.apache.dubbo.remoting.transport.AbstractEndpoint
org.apache.dubbo.remoting.transport.AbstractClient
org.apache.dubbo.remoting.api.connection.AbstractConnectionClient
org.apache.dubbo.remoting.transport.netty4.AbstractNettyConnectionClient
- All Implemented Interfaces:
org.apache.dubbo.common.Resetable,Channel,ChannelHandler,Client,Endpoint,IdleSensible
- Direct Known Subclasses:
NettyConnectionClient
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.netty.util.AttributeKey<AbstractConnectionClient> -
Constructor Summary
ConstructorsConstructorDescriptionAbstractNettyConnectionClient(org.apache.dubbo.common.URL url, ChannelHandler handler) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCloseListener(Runnable func) voidaddConnectedListener(Runnable func) voidvoiddestroy()<T> TgetChannel(Boolean generalizable) io.netty.util.concurrent.Promise<Void> static AbstractConnectionClientgetConnectionClientFromChannel(io.netty.channel.Channel channel) booleanvoidonConnected(Object channel) voidtoString()io.netty.channel.ChannelFutureMethods inherited from class org.apache.dubbo.remoting.api.connection.AbstractConnectionClient
getCounter, increase, release, retainMethods inherited from class org.apache.dubbo.remoting.transport.AbstractClient
close, close, disconnect, getAttribute, getConnectAddress, getLocalAddress, getRemoteAddress, hasAttribute, isConnected, reconnect, removeAttribute, send, setAttributeMethods inherited from class org.apache.dubbo.remoting.transport.AbstractEndpoint
reset, resetMethods inherited from class org.apache.dubbo.remoting.transport.AbstractPeer
caught, connected, disconnected, getChannelHandler, getDelegateHandler, getHandler, getUrl, isClosed, isClosing, received, send, sent, startCloseMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.dubbo.remoting.Endpoint
getChannelHandler, getUrl, isClosed, send, startCloseMethods inherited from interface org.apache.dubbo.remoting.IdleSensible
canHandleIdleMethods inherited from interface org.apache.dubbo.common.Resetable
reset
-
Field Details
-
CONNECTION
-
-
Constructor Details
-
AbstractNettyConnectionClient
public AbstractNettyConnectionClient(org.apache.dubbo.common.URL url, ChannelHandler handler) throws RemotingException - Throws:
RemotingException
-
-
Method Details
-
onConnected
- Specified by:
onConnectedin classAbstractConnectionClient
-
onGoaway
- Specified by:
onGoawayin classAbstractConnectionClient
-
getChannel
- Specified by:
getChannelin classAbstractConnectionClient
-
isAvailable
public boolean isAvailable()- Specified by:
isAvailablein classAbstractConnectionClient
-
getClosePromise
-
getConnectionClientFromChannel
public static AbstractConnectionClient getConnectionClientFromChannel(io.netty.channel.Channel channel) -
write
- Throws:
RemotingException
-
addConnectedListener
- Specified by:
addConnectedListenerin classAbstractConnectionClient
-
addDisconnectedListener
- Specified by:
addDisconnectedListenerin classAbstractConnectionClient
-
addCloseListener
- Specified by:
addCloseListenerin classAbstractConnectionClient
-
destroy
public void destroy()- Specified by:
destroyin classAbstractConnectionClient
-
toString
- Overrides:
toStringin classAbstractClient
-