public class HeaderExchangeClient extends Object implements ExchangeClient
| 限定符和类型 | 字段和说明 |
|---|---|
static GlobalResourceInitializer<HashedWheelTimer> |
IDLE_CHECK_TIMER |
| 构造器和说明 |
|---|
HeaderExchangeClient(Client client,
boolean startTimer) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
close the channel.
|
void |
close(int timeout)
Graceful close the channel.
|
Object |
getAttribute(String key)
get attribute.
|
ChannelHandler |
getChannelHandler()
get channel handler.
|
ExchangeHandler |
getExchangeHandler()
get message handler.
|
InetSocketAddress |
getLocalAddress()
get local address.
|
InetSocketAddress |
getRemoteAddress()
get remote address.
|
URL |
getUrl()
get url.
|
boolean |
hasAttribute(String key)
has attribute.
|
boolean |
isClosed()
is closed.
|
boolean |
isConnected()
is connected.
|
void |
reconnect()
reconnect.
|
void |
removeAttribute(String key)
remove attribute.
|
CompletableFuture<Object> |
request(Object request)
send request.
|
CompletableFuture<Object> |
request(Object request,
ExecutorService executor)
send request.
|
CompletableFuture<Object> |
request(Object request,
int timeout)
send request.
|
CompletableFuture<Object> |
request(Object request,
int timeout,
ExecutorService executor)
send request.
|
void |
reset(Parameters parameters)
已过时。
|
void |
reset(URL url) |
void |
send(Object message)
send message.
|
void |
send(Object message,
boolean sent)
send message.
|
void |
setAttribute(String key,
Object value)
set attribute.
|
void |
startClose() |
String |
toString() |
canHandleIdlepublic static GlobalResourceInitializer<HashedWheelTimer> IDLE_CHECK_TIMER
public HeaderExchangeClient(Client client, boolean startTimer)
public CompletableFuture<Object> request(Object request) throws RemotingException
ExchangeChannelrequest 在接口中 ExchangeChannelRemotingExceptionpublic InetSocketAddress getRemoteAddress()
ChannelgetRemoteAddress 在接口中 Channelpublic CompletableFuture<Object> request(Object request, int timeout) throws RemotingException
ExchangeChannelrequest 在接口中 ExchangeChannelRemotingExceptionpublic CompletableFuture<Object> request(Object request, ExecutorService executor) throws RemotingException
ExchangeChannelrequest 在接口中 ExchangeChannelRemotingExceptionpublic CompletableFuture<Object> request(Object request, int timeout, ExecutorService executor) throws RemotingException
ExchangeChannelrequest 在接口中 ExchangeChannelRemotingExceptionpublic ChannelHandler getChannelHandler()
EndpointgetChannelHandler 在接口中 Endpointpublic boolean isConnected()
ChannelisConnected 在接口中 Channelpublic InetSocketAddress getLocalAddress()
EndpointgetLocalAddress 在接口中 Endpointpublic ExchangeHandler getExchangeHandler()
ExchangeChannelgetExchangeHandler 在接口中 ExchangeChannelpublic void send(Object message) throws RemotingException
Endpointsend 在接口中 EndpointRemotingExceptionpublic void send(Object message, boolean sent) throws RemotingException
Endpointsend 在接口中 Endpointsent - already sent to socket?RemotingExceptionpublic boolean isClosed()
Endpointpublic void close(int timeout)
Endpointclose 在接口中 Endpointclose 在接口中 ExchangeChannelpublic void startClose()
startClose 在接口中 Endpoint@Deprecated public void reset(Parameters parameters)
public void reconnect()
throws RemotingException
Clientreconnect 在接口中 ClientRemotingExceptionpublic 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.Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.