public class HeaderExchangeClient extends Object implements ExchangeClient
| Constructor and Description |
|---|
HeaderExchangeClient(Client client,
boolean needHeartbeat) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
ResponseFuture |
request(Object request)
send request.
|
ResponseFuture |
request(Object request,
int timeout)
send request.
|
void |
reset(Parameters parameters)
Deprecated.
|
void |
reset(URL url)
reset.
|
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() |
public HeaderExchangeClient(Client client, boolean needHeartbeat)
public ResponseFuture request(Object request) throws RemotingException
ExchangeChannelrequest in interface ExchangeChannelRemotingExceptionpublic InetSocketAddress getRemoteAddress()
ChannelgetRemoteAddress in interface Channelpublic ResponseFuture request(Object request, int timeout) throws RemotingException
ExchangeChannelrequest in interface ExchangeChannelRemotingExceptionpublic ChannelHandler getChannelHandler()
EndpointgetChannelHandler in interface Endpointpublic boolean isConnected()
ChannelisConnected in interface Channelpublic InetSocketAddress getLocalAddress()
EndpointgetLocalAddress in interface Endpointpublic ExchangeHandler getExchangeHandler()
ExchangeChannelgetExchangeHandler in interface ExchangeChannelpublic void send(Object message) throws RemotingException
Endpointsend in interface EndpointRemotingExceptionpublic void send(Object message, boolean sent) throws RemotingException
Endpointsend in interface Endpointsent - already sent to socket?RemotingExceptionpublic boolean isClosed()
Endpointpublic void close()
Endpointpublic void close(int timeout)
Endpointclose in interface Endpointclose in interface ExchangeChannelpublic void startClose()
startClose in interface Endpoint@Deprecated public void reset(Parameters parameters)
public void reconnect()
throws RemotingException
Clientreconnect in interface ClientRemotingExceptionpublic Object getAttribute(String key)
ChannelgetAttribute in interface Channelkey - key.public void setAttribute(String key, Object value)
ChannelsetAttribute in interface Channelkey - key.value - value.public void removeAttribute(String key)
ChannelremoveAttribute in interface Channelkey - key.public boolean hasAttribute(String key)
ChannelhasAttribute in interface Channelkey - key.Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.