Class AbstractHttpClientTransport
java.lang.Object
org.cometd.common.AbstractTransport
org.cometd.client.transport.ClientTransport
org.cometd.client.transport.HttpClientTransport
org.cometd.client.http.common.AbstractHttpClientTransport
- All Implemented Interfaces:
Transport
- Direct Known Subclasses:
JettyHttpClientTransport
,OkHttpClientTransport
-
Nested Class Summary
Nested classes/interfaces inherited from class org.cometd.client.transport.ClientTransport
ClientTransport.Factory, ClientTransport.FailureHandler, ClientTransport.FailureInfo
-
Field Summary
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
ModifierConstructorDescriptionprotected
AbstractHttpClientTransport
(String url, Map<String, Object> options) Deprecated.protected
AbstractHttpClientTransport
(String url, Map<String, Object> options, ScheduledExecutorService scheduler) -
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.boolean
protected long
calculateMaxNetworkDelay
(List<Message.Mutable> messages) int
void
init()
protected boolean
protected boolean
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
void
Terminates this transport, usually by closing network connections opened directly by this transport.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, send, setMaxNetworkDelay, setURL, shutdownScheduler
Methods inherited from class org.cometd.common.AbstractTransport
getName, getOption, getOption, getOption, getOption, getOption, getOptionNames, getOptionPrefix, setOption, setOptionPrefix
-
Field Details
-
NAME
- See Also:
-
PREFIX
- See Also:
-
-
Constructor Details
-
AbstractHttpClientTransport
Deprecated.- Parameters:
url
- the CometD server URLoptions
- the transport options
-
AbstractHttpClientTransport
protected AbstractHttpClientTransport(String url, Map<String, Object> options, ScheduledExecutorService scheduler)
-
-
Method Details
-
accept
- Specified by:
accept
in classClientTransport
-
init
public void init()- Overrides:
init
in classClientTransport
-
terminate
public void terminate()Description copied from class:ClientTransport
Terminates this transport, usually by closing network connections opened directly by this transport.- Overrides:
terminate
in classClientTransport
- See Also:
-
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.- Specified by:
abort
in classClientTransport
- Parameters:
failure
- the cause of the abort- See Also:
-
isAborted
protected boolean isAborted() -
getMaxMessageSize
public int getMaxMessageSize() -
isAppendMessageType
protected boolean isAppendMessageType() -
newRequestURI
-
getAdvice
-
setAdvice
-
calculateMaxNetworkDelay
-
processResponseContent
protected void processResponseContent(TransportListener listener, List<Message.Mutable> requestMessages, String content) -
processResponseMessages
-
processWrongResponseCode
protected void processWrongResponseCode(TransportListener listener, List<Message.Mutable> messages, int code)
-
AbstractHttpClientTransport(String, Map, ScheduledExecutorService)
instead