public class ApacheAsyncTransport extends AbstractTransport<java.lang.Object>
stopListeners| Constructor and Description |
|---|
ApacheAsyncTransport() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.apache.http.impl.nio.client.HttpAsyncClientBuilder clientBuilder) |
protected org.apache.http.impl.nio.client.CloseableHttpAsyncClient |
getCloseableHttpAsyncClient() |
org.apache.http.client.config.RequestConfig |
getDefaultRequestConfig() |
boolean |
isDisconnectAfterAuthenticationFailure()
Indicates to the calling Channel that the transport should be closed after an authentication failure
|
boolean |
isReconnectAfterReceive()
Indicates to the calling Channel that the transport should reconnect when data has been received
|
boolean |
isStarted()
Is the transport started ?
|
TransportFuture |
send(Channel channel,
TransportMessage message)
Send a message on the network
|
void |
setDefaultRequestConfig(org.apache.http.client.config.RequestConfig defaultRequestConfig) |
boolean |
start()
Start the transport and enable transmission of data on the network
If there is an exception during start, the status handler is notified
TransportStatusHandler.handleException(org.granite.client.messaging.transport.TransportException) |
void |
stop()
Stop the transport and stop any communication on the network
|
addStopListener, getContext, getStatusHandler, removeStopListener, setContext, setStatusHandlerpublic void configure(org.apache.http.impl.nio.client.HttpAsyncClientBuilder clientBuilder)
public org.apache.http.client.config.RequestConfig getDefaultRequestConfig()
public void setDefaultRequestConfig(org.apache.http.client.config.RequestConfig defaultRequestConfig)
protected org.apache.http.impl.nio.client.CloseableHttpAsyncClient getCloseableHttpAsyncClient()
public boolean isReconnectAfterReceive()
Transportpublic boolean isDisconnectAfterAuthenticationFailure()
TransportisDisconnectAfterAuthenticationFailure in interface TransportisDisconnectAfterAuthenticationFailure in class AbstractTransport<java.lang.Object>public boolean start()
TransportTransportStatusHandler.handleException(org.granite.client.messaging.transport.TransportException)public boolean isStarted()
Transportpublic TransportFuture send(Channel channel, TransportMessage message) throws TransportException
Transportchannel - originating channelmessage - message to sendTransportException - when an error occurs during sendpublic void stop()
Transportstop in interface Transportstop in class AbstractTransport<java.lang.Object>