Class OkHttpClientTransport
java.lang.Object
org.cometd.common.AbstractTransport
org.cometd.client.transport.ClientTransport
org.cometd.client.transport.HttpClientTransport
org.cometd.client.http.common.AbstractHttpClientTransport
org.cometd.client.http.okhttp.OkHttpClientTransport
- All Implemented Interfaces:
Transport
-
Nested Class Summary
Nested classes/interfaces inherited from class org.cometd.client.transport.ClientTransport
ClientTransport.FailureHandler, ClientTransport.FailureInfo
-
Field Summary
Fields inherited from class org.cometd.client.http.common.AbstractHttpClientTransport
NAME, PREFIX
Fields inherited from class org.cometd.client.transport.ClientTransport
JSON_CONTEXT_OPTION, MAX_MESSAGE_SIZE_OPTION, MAX_NETWORK_DELAY_OPTION, MAX_SEND_BAYEUX_MESSAGE_SIZE_OPTION, SCHEDULER_OPTION, URL_OPTION
-
Constructor Summary
ConstructorDescriptionOkHttpClientTransport
(String url, Map<String, Object> options, ScheduledExecutorService scheduler, okhttp3.OkHttpClient client) OkHttpClientTransport
(String url, Map<String, Object> options, okhttp3.OkHttpClient client) OkHttpClientTransport
(Map<String, Object> options, okhttp3.OkHttpClient client) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Aborts this transport, usually by cancelling all pending Bayeux messages that require a response, such as/meta/connect
s, without waiting for a response.protected void
protected okhttp3.OkHttpClient
void
init()
void
send
(TransportListener listener, List<Message.Mutable> messages) Methods inherited from class org.cometd.client.http.common.AbstractHttpClientTransport
accept, calculateMaxNetworkDelay, getAdvice, getMaxMessageSize, isAborted, isAppendMessageType, newRequestURI, processResponseContent, processResponseMessages, processWrongResponseCode, setAdvice, terminate
Methods inherited from class org.cometd.client.transport.HttpClientTransport
getCookies, getHttpCookieStore, setHttpCookieStore, storeCookies
Methods inherited from class org.cometd.client.transport.ClientTransport
generateJSON, getJSONContextClient, getMaxNetworkDelay, getScheduler, getURL, initScheduler, parseMessages, setMaxNetworkDelay, setURL, shutdownScheduler
Methods inherited from class org.cometd.common.AbstractTransport
getName, getOption, getOption, getOption, getOption, getOption, getOptionNames, getOptionPrefix, setOption, setOptionPrefix
-
Constructor Details
-
OkHttpClientTransport
-
OkHttpClientTransport
-
OkHttpClientTransport
public OkHttpClientTransport(String url, Map<String, Object> options, ScheduledExecutorService scheduler, okhttp3.OkHttpClient client)
-
-
Method Details
-
getOkHttpClient
protected okhttp3.OkHttpClient getOkHttpClient() -
init
public void init()- Overrides:
init
in classAbstractHttpClientTransport
-
abort
Description copied from class:ClientTransport
Aborts this transport, usually by cancelling all pending Bayeux messages that require a response, such as/meta/connect
s, without waiting for a response.- Overrides:
abort
in classAbstractHttpClientTransport
- Parameters:
failure
- the cause of the abort- See Also:
-
send
- Specified by:
send
in classClientTransport
-
customize
-