Class AbstractClient
java.lang.Object
org.apache.dubbo.remoting.transport.AbstractPeer
org.apache.dubbo.remoting.transport.AbstractEndpoint
org.apache.dubbo.remoting.transport.AbstractClient
- All Implemented Interfaces:
Resetable,Channel,ChannelHandler,Client,Endpoint,IdleSensible
- Direct Known Subclasses:
AbstractConnectionClient
AbstractClient
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()close the channel.voidclose(int timeout) Graceful close the channel.voidgetAttribute(String key) get attribute.get local address.get remote address.booleanhasAttribute(String key) has attribute.booleanis connected.voidreconnect.voidremoveAttribute(String key) remove attribute.voidsend message.voidsetAttribute(String key, Object value) set attribute.toString()Methods 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
canHandleIdle
-
Constructor Details
-
AbstractClient
- Throws:
RemotingException
-
-
Method Details
-
getConnectAddress
-
getRemoteAddress
Description copied from interface:Channelget remote address.- Specified by:
getRemoteAddressin interfaceChannel- Returns:
- remote address.
-
getLocalAddress
Description copied from interface:Endpointget local address.- Specified by:
getLocalAddressin interfaceEndpoint- Returns:
- local address.
-
isConnected
public boolean isConnected()Description copied from interface:Channelis connected.- Specified by:
isConnectedin interfaceChannel- Returns:
- connected
-
getAttribute
Description copied from interface:Channelget attribute.- Specified by:
getAttributein interfaceChannel- Parameters:
key- key.- Returns:
- value.
-
setAttribute
Description copied from interface:Channelset attribute.- Specified by:
setAttributein interfaceChannel- Parameters:
key- key.value- value.
-
removeAttribute
Description copied from interface:Channelremove attribute.- Specified by:
removeAttributein interfaceChannel- Parameters:
key- key.
-
hasAttribute
Description copied from interface:Channelhas attribute.- Specified by:
hasAttributein interfaceChannel- Parameters:
key- key.- Returns:
- has or has not.
-
send
Description copied from interface:Endpointsend message.- Specified by:
sendin interfaceEndpoint- Parameters:
message-sent- already sent to socket?- Throws:
RemotingException
-
disconnect
public void disconnect() -
reconnect
Description copied from interface:Clientreconnect.- Specified by:
reconnectin interfaceClient- Throws:
RemotingException
-
close
public void close()Description copied from interface:Endpointclose the channel.- Specified by:
closein interfaceEndpoint- Overrides:
closein classAbstractPeer
-
close
public void close(int timeout) Description copied from interface:EndpointGraceful close the channel.- Specified by:
closein interfaceEndpoint- Overrides:
closein classAbstractPeer
-
toString
-