public abstract class AbstractClient extends AbstractEndpoint implements Client
| 构造器和说明 |
|---|
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() |
reset, resetcaught, connected, disconnected, getChannelHandler, getDelegateHandler, getHandler, getUrl, isClosed, isClosing, received, send, sent, startClosegetChannelHandler, getUrl, isClosed, send, startClosecanHandleIdlepublic AbstractClient(URL url, ChannelHandler handler) throws RemotingException
public InetSocketAddress getConnectAddress()
public InetSocketAddress getRemoteAddress()
ChannelgetRemoteAddress 在接口中 Channelpublic InetSocketAddress getLocalAddress()
EndpointgetLocalAddress 在接口中 Endpointpublic boolean isConnected()
ChannelisConnected 在接口中 Channelpublic Object getAttribute(String key)
ChannelgetAttribute 在接口中 Channelkey - key.public void setAttribute(String key, Object value)
ChannelsetAttribute 在接口中 Channelkey - key.value - value.public void removeAttribute(String key)
ChannelremoveAttribute 在接口中 Channelkey - key.public boolean hasAttribute(String key)
ChannelhasAttribute 在接口中 Channelkey - key.public void send(Object message, boolean sent) throws RemotingException
Endpointsend 在接口中 Endpointsent - already sent to socket?RemotingExceptionpublic void disconnect()
public void reconnect()
throws RemotingException
Clientreconnect 在接口中 ClientRemotingExceptionpublic void close()
Endpointclose 在接口中 Endpointclose 在类中 AbstractPeerpublic void close(int timeout)
Endpointclose 在接口中 Endpointclose 在类中 AbstractPeerCopyright © 2011–2021 The Apache Software Foundation. All rights reserved.