public abstract class AbstractHttpClientTransport extends HttpClientTransport
ClientTransport.Factory, ClientTransport.FailureHandler, ClientTransport.FailureInfo
Modifier and Type | Field and Description |
---|---|
static String |
NAME |
static String |
PREFIX |
JSON_CONTEXT_OPTION, MAX_MESSAGE_SIZE_OPTION, MAX_NETWORK_DELAY_OPTION, MAX_SEND_BAYEUX_MESSAGE_SIZE_OPTION, SCHEDULER_OPTION, URL_OPTION
Modifier | Constructor and Description |
---|---|
protected |
AbstractHttpClientTransport(String url,
Map<String,Object> options)
Deprecated.
|
protected |
AbstractHttpClientTransport(String url,
Map<String,Object> options,
ScheduledExecutorService scheduler) |
Modifier and Type | Method and Description |
---|---|
void |
abort(Throwable failure)
Aborts this transport, usually by cancelling all pending Bayeux messages that require a response,
such as
/meta/connect s, without waiting for a response. |
boolean |
accept(String bayeuxVersion) |
protected long |
calculateMaxNetworkDelay(List<Message.Mutable> messages) |
protected Map<String,Object> |
getAdvice() |
int |
getMaxMessageSize() |
void |
init() |
protected boolean |
isAborted() |
protected boolean |
isAppendMessageType() |
protected String |
newRequestURI(List<Message.Mutable> messages) |
protected void |
processResponseContent(TransportListener listener,
List<Message.Mutable> requestMessages,
String content) |
protected void |
processResponseMessages(TransportListener listener,
List<Message.Mutable> messages) |
protected void |
processWrongResponseCode(TransportListener listener,
List<Message.Mutable> messages,
int code) |
protected void |
setAdvice(Map<String,Object> advice) |
void |
terminate()
Terminates this transport, usually by closing network connections opened directly by this transport.
|
getCookies, getCookieStore, setCookieStore, storeCookies
generateJSON, getJSONContextClient, getMaxNetworkDelay, getScheduler, getURL, initScheduler, parseMessages, send, setMaxNetworkDelay, setURL, shutdownScheduler
getName, getOption, getOption, getOption, getOption, getOption, getOptionNames, getOptionPrefix, setOption, setOptionPrefix
public static final String NAME
public static final String PREFIX
@Deprecated protected AbstractHttpClientTransport(String url, Map<String,Object> options)
AbstractHttpClientTransport(String, Map, ScheduledExecutorService)
insteadurl
- the CometD server URLoptions
- the transport optionsprotected AbstractHttpClientTransport(String url, Map<String,Object> options, ScheduledExecutorService scheduler)
public boolean accept(String bayeuxVersion)
accept
in class ClientTransport
public void init()
init
in class ClientTransport
public void terminate()
ClientTransport
terminate
in class ClientTransport
ClientSession.disconnect()
public void abort(Throwable failure)
ClientTransport
/meta/connect
s, without waiting for a response.abort
in class ClientTransport
failure
- the cause of the abortBayeuxClient.abort()
protected boolean isAborted()
public int getMaxMessageSize()
protected boolean isAppendMessageType()
protected String newRequestURI(List<Message.Mutable> messages)
protected long calculateMaxNetworkDelay(List<Message.Mutable> messages)
protected void processResponseContent(TransportListener listener, List<Message.Mutable> requestMessages, String content)
protected void processResponseMessages(TransportListener listener, List<Message.Mutable> messages)
protected void processWrongResponseCode(TransportListener listener, List<Message.Mutable> messages, int code)
Copyright © 2008–2024 The CometD Project. All rights reserved.