类 AbstractClient
- java.lang.Object
-
- com.alibaba.dubbo.remoting.transport.AbstractPeer
-
- com.alibaba.dubbo.remoting.transport.AbstractEndpoint
-
- com.alibaba.dubbo.remoting.transport.AbstractClient
-
- 所有已实现的接口:
Resetable
,Channel
,ChannelHandler
,Client
,Endpoint
- 直接已知子类:
GrizzlyClient
,MinaClient
,NettyClient
,NettyClient
public abstract class AbstractClient extends AbstractEndpoint implements Client
AbstractClient
-
-
构造器概要
构造器 构造器 说明 AbstractClient(URL url, ChannelHandler handler)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
close()
close the channel.void
close(int timeout)
Graceful close the channel.void
disconnect()
Object
getAttribute(String key)
get attribute.InetSocketAddress
getConnectAddress()
InetSocketAddress
getLocalAddress()
get local address.InetSocketAddress
getRemoteAddress()
get remote address.boolean
hasAttribute(String key)
has attribute.boolean
isConnected()
is connected.void
reconnect()
reconnect.void
removeAttribute(String key)
remove attribute.void
send(Object message, boolean sent)
send message.void
setAttribute(String key, Object value)
set attribute.String
toString()
-
从类继承的方法 com.alibaba.dubbo.remoting.transport.AbstractEndpoint
reset, reset
-
从类继承的方法 com.alibaba.dubbo.remoting.transport.AbstractPeer
caught, connected, disconnected, getChannelHandler, getDelegateHandler, getHandler, getUrl, isClosed, isClosing, received, send, sent, startClose
-
从接口继承的方法 com.alibaba.dubbo.remoting.Endpoint
getChannelHandler, getUrl, isClosed, send, startClose
-
-
-
-
构造器详细资料
-
AbstractClient
public AbstractClient(URL url, ChannelHandler handler) throws RemotingException
-
-
方法详细资料
-
getConnectAddress
public InetSocketAddress getConnectAddress()
-
getRemoteAddress
public InetSocketAddress getRemoteAddress()
从接口复制的说明:Channel
get remote address.- 指定者:
getRemoteAddress
在接口中Channel
- 返回:
- remote address.
-
getLocalAddress
public InetSocketAddress getLocalAddress()
从接口复制的说明:Endpoint
get local address.- 指定者:
getLocalAddress
在接口中Endpoint
- 返回:
- local address.
-
isConnected
public boolean isConnected()
从接口复制的说明:Channel
is connected.- 指定者:
isConnected
在接口中Channel
- 返回:
- connected
-
getAttribute
public Object getAttribute(String key)
从接口复制的说明:Channel
get attribute.- 指定者:
getAttribute
在接口中Channel
- 参数:
key
- key.- 返回:
- value.
-
setAttribute
public void setAttribute(String key, Object value)
从接口复制的说明:Channel
set attribute.- 指定者:
setAttribute
在接口中Channel
- 参数:
key
- key.value
- value.
-
removeAttribute
public void removeAttribute(String key)
从接口复制的说明:Channel
remove attribute.- 指定者:
removeAttribute
在接口中Channel
- 参数:
key
- key.
-
hasAttribute
public boolean hasAttribute(String key)
从接口复制的说明:Channel
has attribute.- 指定者:
hasAttribute
在接口中Channel
- 参数:
key
- key.- 返回:
- has or has not.
-
send
public void send(Object message, boolean sent) throws RemotingException
从接口复制的说明:Endpoint
send message.- 指定者:
send
在接口中Endpoint
sent
- already sent to socket?- 抛出:
RemotingException
-
disconnect
public void disconnect()
-
reconnect
public void reconnect() throws RemotingException
从接口复制的说明:Client
reconnect.- 指定者:
reconnect
在接口中Client
- 抛出:
RemotingException
-
close
public void close()
从接口复制的说明:Endpoint
close the channel.- 指定者:
close
在接口中Endpoint
- 覆盖:
close
在类中AbstractPeer
-
close
public void close(int timeout)
从接口复制的说明:Endpoint
Graceful close the channel.- 指定者:
close
在接口中Endpoint
- 覆盖:
close
在类中AbstractPeer
-
-