Class HeaderExchangeClient
java.lang.Object
org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeClient
- All Implemented Interfaces:
Resetable,Channel,Client,Endpoint,ExchangeChannel,ExchangeClient,IdleSensible
DefaultMessageClient
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()close the channel.voidclose(int timeout) Graceful close the channel.getAttribute(String key) get attribute.get channel handler.get message handler.get local address.get remote address.getUrl()get url.booleanhasAttribute(String key) has attribute.booleanisClosed()is closed.booleanis connected.voidreconnect.voidremoveAttribute(String key) remove attribute.send request.send request.request(Object request, int timeout, ExecutorService executor) send request.request(Object request, ExecutorService executor) send request.voidreset(Parameters parameters) Deprecated.voidvoidsend message.voidsend message.voidsetAttribute(String key, Object value) set attribute.voidtoString()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.dubbo.remoting.IdleSensible
canHandleIdle
-
Field Details
-
IDLE_CHECK_TIMER
-
-
Constructor Details
-
HeaderExchangeClient
-
-
Method Details
-
request
Description copied from interface:ExchangeChannelsend request.- Specified by:
requestin interfaceExchangeChannel- Parameters:
request-- Returns:
- response future
- Throws:
RemotingException
-
getUrl
Description copied from interface:Endpointget url. -
getRemoteAddress
Description copied from interface:Channelget remote address.- Specified by:
getRemoteAddressin interfaceChannel- Returns:
- remote address.
-
request
Description copied from interface:ExchangeChannelsend request.- Specified by:
requestin interfaceExchangeChannel- Parameters:
request-timeout-- Returns:
- response future
- Throws:
RemotingException
-
request
public CompletableFuture<Object> request(Object request, ExecutorService executor) throws RemotingException Description copied from interface:ExchangeChannelsend request.- Specified by:
requestin interfaceExchangeChannel- Parameters:
request-- Returns:
- response future
- Throws:
RemotingException
-
request
public CompletableFuture<Object> request(Object request, int timeout, ExecutorService executor) throws RemotingException Description copied from interface:ExchangeChannelsend request.- Specified by:
requestin interfaceExchangeChannel- Parameters:
request-timeout-- Returns:
- response future
- Throws:
RemotingException
-
getChannelHandler
Description copied from interface:Endpointget channel handler.- Specified by:
getChannelHandlerin interfaceEndpoint- Returns:
- channel handler
-
isConnected
public boolean isConnected()Description copied from interface:Channelis connected.- Specified by:
isConnectedin interfaceChannel- Returns:
- connected
-
getLocalAddress
Description copied from interface:Endpointget local address.- Specified by:
getLocalAddressin interfaceEndpoint- Returns:
- local address.
-
getExchangeHandler
Description copied from interface:ExchangeChannelget message handler.- Specified by:
getExchangeHandlerin interfaceExchangeChannel- Returns:
- message handler
-
send
Description copied from interface:Endpointsend message.- Specified by:
sendin interfaceEndpoint- Parameters:
message-- Throws:
RemotingException
-
send
Description copied from interface:Endpointsend message.- Specified by:
sendin interfaceEndpoint- Parameters:
message-sent- already sent to socket?- Throws:
RemotingException
-
isClosed
public boolean isClosed()Description copied from interface:Endpointis closed. -
close
public void close()Description copied from interface:Endpointclose the channel. -
close
public void close(int timeout) Description copied from interface:EndpointGraceful close the channel.- Specified by:
closein interfaceEndpoint- Specified by:
closein interfaceExchangeChannel- Parameters:
timeout-
-
startClose
public void startClose()- Specified by:
startClosein interfaceEndpoint
-
reset
-
reset
Deprecated. -
reconnect
Description copied from interface:Clientreconnect.- Specified by:
reconnectin interfaceClient- Throws:
RemotingException
-
getAttribute
Description copied from interface:Channelget attribute.- Specified by:
getAttributein interfaceChannel- Parameters:
key- key.- Returns:
- value.
-
setAttribute
Description copied from interface:Channelset attribute.- Specified by:
setAttributein interfaceChannel- Parameters:
key- key.value- value.
-
removeAttribute
Description copied from interface:Channelremove attribute.- Specified by:
removeAttributein interfaceChannel- Parameters:
key- key.
-
hasAttribute
Description copied from interface:Channelhas attribute.- Specified by:
hasAttributein interfaceChannel- Parameters:
key- key.- Returns:
- has or has not.
-
toString
-