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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
close the channel.void
close
(int timeout) Graceful close the channel.void
getAttribute
(String key) get attribute.get local address.get remote address.boolean
hasAttribute
(String key) has attribute.boolean
is connected.void
reconnect.void
removeAttribute
(String key) remove attribute.void
send message.void
setAttribute
(String key, Object value) set attribute.toString()
Methods inherited from class org.apache.dubbo.remoting.transport.AbstractEndpoint
reset, reset
Methods inherited from class org.apache.dubbo.remoting.transport.AbstractPeer
caught, connected, disconnected, getChannelHandler, getDelegateHandler, getHandler, getUrl, isClosed, isClosing, received, send, sent, startClose
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, 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
-
Constructor Details
-
AbstractClient
- Throws:
RemotingException
-
-
Method Details
-
getConnectAddress
-
getRemoteAddress
Description copied from interface:Channel
get remote address.- Specified by:
getRemoteAddress
in interfaceChannel
- Returns:
- remote address.
-
getLocalAddress
Description copied from interface:Endpoint
get local address.- Specified by:
getLocalAddress
in interfaceEndpoint
- Returns:
- local address.
-
isConnected
public boolean isConnected()Description copied from interface:Channel
is connected.- Specified by:
isConnected
in interfaceChannel
- Returns:
- connected
-
getAttribute
Description copied from interface:Channel
get attribute.- Specified by:
getAttribute
in interfaceChannel
- Parameters:
key
- key.- Returns:
- value.
-
setAttribute
Description copied from interface:Channel
set attribute.- Specified by:
setAttribute
in interfaceChannel
- Parameters:
key
- key.value
- value.
-
removeAttribute
Description copied from interface:Channel
remove attribute.- Specified by:
removeAttribute
in interfaceChannel
- Parameters:
key
- key.
-
hasAttribute
Description copied from interface:Channel
has attribute.- Specified by:
hasAttribute
in interfaceChannel
- Parameters:
key
- key.- Returns:
- has or has not.
-
send
Description copied from interface:Endpoint
send message.- Specified by:
send
in interfaceEndpoint
- Parameters:
message
-sent
- already sent to socket?- Throws:
RemotingException
-
disconnect
public void disconnect() -
reconnect
Description copied from interface:Client
reconnect.- Specified by:
reconnect
in interfaceClient
- 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
-
toString
-