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
Modifier and TypeFieldDescription -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
close the channel.void
close
(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.boolean
hasAttribute
(String key) has attribute.boolean
isClosed()
is closed.boolean
is connected.void
reconnect.void
removeAttribute
(String key) remove attribute.send request.send request.request
(Object request, int timeout, ExecutorService executor) send request.request
(Object request, ExecutorService executor) send request.void
reset
(Parameters parameters) Deprecated.void
void
send message.void
send message.void
setAttribute
(String key, Object value) set attribute.void
toString()
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.dubbo.remoting.IdleSensible
canHandleIdle
-
Field Details
-
IDLE_CHECK_TIMER
-
-
Constructor Details
-
HeaderExchangeClient
-
-
Method Details
-
request
Description copied from interface:ExchangeChannel
send request.- Specified by:
request
in interfaceExchangeChannel
- Parameters:
request
-- Returns:
- response future
- Throws:
RemotingException
-
getUrl
Description copied from interface:Endpoint
get url. -
getRemoteAddress
Description copied from interface:Channel
get remote address.- Specified by:
getRemoteAddress
in interfaceChannel
- Returns:
- remote address.
-
request
Description copied from interface:ExchangeChannel
send request.- Specified by:
request
in interfaceExchangeChannel
- Parameters:
request
-timeout
-- Returns:
- response future
- Throws:
RemotingException
-
request
public CompletableFuture<Object> request(Object request, ExecutorService executor) throws RemotingException Description copied from interface:ExchangeChannel
send request.- Specified by:
request
in 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:ExchangeChannel
send request.- Specified by:
request
in interfaceExchangeChannel
- Parameters:
request
-timeout
-- Returns:
- response future
- Throws:
RemotingException
-
getChannelHandler
Description copied from interface:Endpoint
get channel handler.- Specified by:
getChannelHandler
in interfaceEndpoint
- Returns:
- channel handler
-
isConnected
public boolean isConnected()Description copied from interface:Channel
is connected.- Specified by:
isConnected
in interfaceChannel
- Returns:
- connected
-
getLocalAddress
Description copied from interface:Endpoint
get local address.- Specified by:
getLocalAddress
in interfaceEndpoint
- Returns:
- local address.
-
getExchangeHandler
Description copied from interface:ExchangeChannel
get message handler.- Specified by:
getExchangeHandler
in interfaceExchangeChannel
- Returns:
- message handler
-
send
Description copied from interface:Endpoint
send message.- Specified by:
send
in interfaceEndpoint
- Parameters:
message
-- Throws:
RemotingException
-
send
Description copied from interface:Endpoint
send message.- Specified by:
send
in interfaceEndpoint
- Parameters:
message
-sent
- already sent to socket?- Throws:
RemotingException
-
isClosed
public boolean isClosed()Description copied from interface:Endpoint
is closed. -
close
public void close()Description copied from interface:Endpoint
close the channel. -
close
public void close(int timeout) Description copied from interface:Endpoint
Graceful close the channel.- Specified by:
close
in interfaceEndpoint
- Specified by:
close
in interfaceExchangeChannel
- Parameters:
timeout
-
-
startClose
public void startClose()- Specified by:
startClose
in interfaceEndpoint
-
reset
-
reset
Deprecated. -
reconnect
Description copied from interface:Client
reconnect.- Specified by:
reconnect
in interfaceClient
- Throws:
RemotingException
-
getAttribute
Description copied from interface:Channel
get attribute.- Specified by:
getAttribute
in interfaceChannel
- Parameters:
key
- key.- Returns:
- value.
-
setAttribute
Description copied from interface:Channel
set attribute.- Specified by:
setAttribute
in interfaceChannel
- Parameters:
key
- key.value
- value.
-
removeAttribute
Description copied from interface:Channel
remove attribute.- Specified by:
removeAttribute
in interfaceChannel
- Parameters:
key
- key.
-
hasAttribute
Description copied from interface:Channel
has attribute.- Specified by:
hasAttribute
in interfaceChannel
- Parameters:
key
- key.- Returns:
- has or has not.
-
toString
-