public class OkHttpWebSocketTransport extends AbstractWebSocketTransport
Modifier and Type | Class and Description |
---|---|
static class |
OkHttpWebSocketTransport.Factory |
protected class |
OkHttpWebSocketTransport.OkHttpDelegate |
AbstractWebSocketTransport.Delegate
ClientTransport.FailureHandler, ClientTransport.FailureInfo
CONNECT_TIMEOUT_OPTION, COOKIE_HEADER, IDLE_TIMEOUT_OPTION, MAX_CLOSE_REASON_LENGTH, NAME, NORMAL_CLOSE_CODE, PERMESSAGE_DEFLATE_OPTION, PREFIX, PROTOCOL_OPTION, STICKY_RECONNECT_OPTION
JSON_CONTEXT_OPTION, MAX_MESSAGE_SIZE_OPTION, MAX_NETWORK_DELAY_OPTION, MAX_SEND_BAYEUX_MESSAGE_SIZE_OPTION, SCHEDULER_OPTION, URL_OPTION
Constructor and Description |
---|
OkHttpWebSocketTransport(Map<String,Object> options,
okhttp3.OkHttpClient okHttpClient) |
OkHttpWebSocketTransport(String uri,
Map<String,Object> options,
ScheduledExecutorService scheduler,
okhttp3.OkHttpClient okHttpClient) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(String s) |
protected AbstractWebSocketTransport.Delegate |
connect(String uri,
TransportListener listener,
List<Message.Mutable> messages) |
static Map<String,List<String>> |
headersToMap(okhttp3.Headers headers) |
void |
init() |
protected OkHttpWebSocketTransport.OkHttpDelegate |
newDelegate() |
protected void |
onHandshakeRequest(String uri,
okhttp3.Request.Builder upgradeRequest) |
protected void |
onHandshakeResponse(okhttp3.Response response) |
abort, getConnectTimeout, getDelegate, getIdleTimeout, getProtocol, isPerMessageDeflateEnabled, isStickyReconnect, locked, locked, send, setMessageTransportListener, setURL, terminate
getCookies, getCookieStore, setCookieStore, storeCookies
generateJSON, getJSONContextClient, getMaxNetworkDelay, getScheduler, getURL, initScheduler, parseMessages, setMaxNetworkDelay, shutdownScheduler
getName, getOption, getOption, getOption, getOption, getOption, getOptionNames, getOptionPrefix, setOption, setOptionPrefix
public OkHttpWebSocketTransport(Map<String,Object> options, okhttp3.OkHttpClient okHttpClient)
public OkHttpWebSocketTransport(String uri, Map<String,Object> options, ScheduledExecutorService scheduler, okhttp3.OkHttpClient okHttpClient)
public void init()
init
in class AbstractWebSocketTransport
public boolean accept(String s)
accept
in class ClientTransport
protected AbstractWebSocketTransport.Delegate connect(String uri, TransportListener listener, List<Message.Mutable> messages)
connect
in class AbstractWebSocketTransport
protected OkHttpWebSocketTransport.OkHttpDelegate newDelegate()
protected void onHandshakeRequest(String uri, okhttp3.Request.Builder upgradeRequest)
protected void onHandshakeResponse(okhttp3.Response response)
Copyright © 2008–2024 The CometD Project. All rights reserved.