public abstract class ClientTransport extends AbstractTransport
ClientTransports are used by BayeuxClient to send and receive Bayeux messages.| Modifier and Type | Class and Description |
|---|---|
static interface |
ClientTransport.Factory |
| Modifier and Type | Field and Description |
|---|---|
static String |
JSON_CONTEXT_OPTION |
protected org.slf4j.Logger |
logger |
static String |
MAX_NETWORK_DELAY_OPTION |
static String |
SCHEDULER_OPTION |
| Modifier | Constructor and Description |
|---|---|
protected |
ClientTransport(String name,
Map<String,Object> options) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
abort()
Aborts this transport, usually by cancelling all pending Bayeux messages that require a response,
such as
/meta/connects, without waiting for a response. |
abstract boolean |
accept(String version) |
protected String |
generateJSON(List<Message.Mutable> messages) |
long |
getMaxNetworkDelay() |
void |
init() |
protected List<Message.Mutable> |
parseMessages(String content) |
abstract void |
send(TransportListener listener,
List<Message.Mutable> messages) |
protected void |
setMaxNetworkDelay(long maxNetworkDelay) |
void |
terminate()
Terminates this transport, usually by closing network connections opened directly by this transport.
|
getName, getOption, getOption, getOption, getOption, getOption, getOptionNames, getOptionPrefix, setOption, setOptionPrefixpublic static final String MAX_NETWORK_DELAY_OPTION
public static final String JSON_CONTEXT_OPTION
public static final String SCHEDULER_OPTION
protected final org.slf4j.Logger logger
public void init()
public abstract void abort()
/meta/connects, without waiting for a response.BayeuxClient.abort()public void terminate()
BayeuxClient.disconnect()public abstract boolean accept(String version)
public abstract void send(TransportListener listener, List<Message.Mutable> messages)
protected List<Message.Mutable> parseMessages(String content) throws ParseException
ParseExceptionprotected String generateJSON(List<Message.Mutable> messages)
public long getMaxNetworkDelay()
protected void setMaxNetworkDelay(long maxNetworkDelay)
Copyright © 2008–2016 Dojo Foundation. All rights reserved.