|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.alibaba.dubbo.remoting.transport.AbstractPeer
com.alibaba.dubbo.remoting.transport.AbstractEndpoint
com.alibaba.dubbo.remoting.transport.AbstractClient
public abstract class AbstractClient
AbstractClient
Constructor Summary | |
---|---|
AbstractClient(URL url,
ChannelHandler handler)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class com.alibaba.dubbo.remoting.transport.AbstractEndpoint |
---|
reset, reset |
Methods inherited from class com.alibaba.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 com.alibaba.dubbo.remoting.Client |
---|
reset |
Methods inherited from interface com.alibaba.dubbo.remoting.Endpoint |
---|
getChannelHandler, getUrl, isClosed, send, startClose |
Methods inherited from interface com.alibaba.dubbo.common.Resetable |
---|
reset |
Constructor Detail |
---|
public AbstractClient(URL url, ChannelHandler handler) throws RemotingException
RemotingException
Method Detail |
---|
public InetSocketAddress getConnectAddress()
public InetSocketAddress getRemoteAddress()
Channel
getRemoteAddress
in interface Channel
public InetSocketAddress getLocalAddress()
Endpoint
getLocalAddress
in interface Endpoint
public boolean isConnected()
Channel
isConnected
in interface Channel
public Object getAttribute(String key)
Channel
getAttribute
in interface Channel
key
- key.
public void setAttribute(String key, Object value)
Channel
setAttribute
in interface Channel
key
- key.value
- value.public void removeAttribute(String key)
Channel
removeAttribute
in interface Channel
key
- key.public boolean hasAttribute(String key)
Channel
hasAttribute
in interface Channel
key
- key.
public void send(Object message, boolean sent) throws RemotingException
Endpoint
send
in interface Endpoint
sent
- 是否已发送完成
RemotingException
public void disconnect()
public void reconnect() throws RemotingException
Client
reconnect
in interface Client
RemotingException
public void close()
Endpoint
close
in interface Endpoint
close
in class AbstractPeer
public void close(int timeout)
Endpoint
close
in interface Endpoint
close
in class AbstractPeer
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |