Package org.cometd.client.transport
Class ClientTransport
java.lang.Object
org.cometd.common.AbstractTransport
org.cometd.client.transport.ClientTransport
- All Implemented Interfaces:
org.cometd.bayeux.Transport
- Direct Known Subclasses:
HttpClientTransport
ClientTransports are used by BayeuxClient to send and receive Bayeux messages.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic class -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated.protectedClientTransport(String name, String url, Map<String,Object> options, ScheduledExecutorService scheduler) -
Method Summary
Modifier and TypeMethodDescriptionabstract voidAborts this transport, usually by cancelling all pending Bayeux messages that require a response, such as/meta/connects, without waiting for a response.abstract booleanprotected StringgenerateJSON(List<org.cometd.bayeux.Message.Mutable> messages)protected JSONContext.Clientlongprotected ScheduledExecutorServicegetURL()voidinit()protected voidprotected List<org.cometd.bayeux.Message.Mutable>parseMessages(String content)abstract voidsend(TransportListener listener, List<org.cometd.bayeux.Message.Mutable> messages)protected voidsetMaxNetworkDelay(long maxNetworkDelay)voidprotected voidvoidTerminates 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:
- Constant Field Values
-
MAX_NETWORK_DELAY_OPTION
- See Also:
- Constant Field Values
-
JSON_CONTEXT_OPTION
- See Also:
- Constant Field Values
-
SCHEDULER_OPTION
- See Also:
- Constant Field Values
-
MAX_SEND_BAYEUX_MESSAGE_SIZE_OPTION
- See Also:
- Constant Field Values
-
MAX_MESSAGE_SIZE_OPTION
- See Also:
- Constant Field Values
-
-
Constructor Details
-
ClientTransport
Deprecated. -
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/connects, without waiting for a response.- Parameters:
failure- the cause of the abort- See Also:
BayeuxClient.abort()
-
terminate
public void terminate()Terminates this transport, usually by closing network connections opened directly by this transport.- See Also:
ClientSession.disconnect()
-
accept
-
send
public abstract void send(TransportListener listener, List<org.cometd.bayeux.Message.Mutable> messages) -
parseMessages
protected List<org.cometd.bayeux.Message.Mutable> parseMessages(String content) throws ParseException- Throws:
ParseException
-
generateJSON
-
getMaxNetworkDelay
public long getMaxNetworkDelay() -
setMaxNetworkDelay
protected void setMaxNetworkDelay(long maxNetworkDelay)
-