Class ClientTransport
java.lang.Object
org.cometd.common.AbstractTransport
org.cometd.client.transport.ClientTransport
- All Implemented Interfaces:
Transport
- Direct Known Subclasses:
HttpClientTransport
ClientTransport
s are used by BayeuxClient
to send and receive Bayeux messages.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
static class
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
Deprecated.protected
ClientTransport
(String name, String url, Map<String, Object> options, ScheduledExecutorService scheduler) -
Method Summary
Modifier and TypeMethodDescriptionabstract void
Aborts this transport, usually by cancelling all pending Bayeux messages that require a response, such as/meta/connect
s, without waiting for a response.abstract boolean
protected String
generateJSON
(List<Message.Mutable> messages) protected JSONContext.Client
long
protected ScheduledExecutorService
getURL()
void
init()
protected void
protected List
<Message.Mutable> parseMessages
(String content) abstract void
send
(TransportListener listener, List<Message.Mutable> messages) protected void
setMaxNetworkDelay
(long maxNetworkDelay) void
protected void
void
Terminates this transport, usually by closing network connections opened directly by this transport.Methods inherited from class org.cometd.common.AbstractTransport
getName, getOption, getOption, getOption, getOption, getOption, getOptionNames, getOptionPrefix, setOption, setOptionPrefix
-
Field Details
-
URL_OPTION
- See Also:
-
MAX_NETWORK_DELAY_OPTION
- See Also:
-
JSON_CONTEXT_OPTION
- See Also:
-
SCHEDULER_OPTION
- See Also:
-
MAX_SEND_BAYEUX_MESSAGE_SIZE_OPTION
- See Also:
-
MAX_MESSAGE_SIZE_OPTION
- See Also:
-
-
Constructor Details
-
ClientTransport
-
ClientTransport
-
-
Method Details
-
getURL
-
setURL
-
init
public void init() -
getJSONContextClient
-
initScheduler
protected void initScheduler() -
shutdownScheduler
protected void shutdownScheduler() -
getScheduler
-
abort
Aborts this transport, usually by cancelling all pending Bayeux messages that require a response, such as/meta/connect
s, without waiting for a response.- Parameters:
failure
- the cause of the abort- See Also:
-
terminate
public void terminate()Terminates this transport, usually by closing network connections opened directly by this transport.- See Also:
-
accept
-
send
-
parseMessages
- Throws:
ParseException
-
generateJSON
-
getMaxNetworkDelay
public long getMaxNetworkDelay() -
setMaxNetworkDelay
protected void setMaxNetworkDelay(long maxNetworkDelay)
-