public abstract class ClientTransport extends AbstractTransport
ClientTransports are used by BayeuxClient to send and receive Bayeux messages.| Modifier and Type | Field and Description |
|---|---|
static String |
JSON_CONTEXT |
protected org.slf4j.Logger |
logger |
static String |
MAX_NETWORK_DELAY_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 void |
debug(String message,
Object... args) |
protected String |
generateJSON(Message.Mutable[] messages) |
long |
getMaxNetworkDelay() |
void |
init()
Initializes this transport, usually by reading/defaulting parameters used by the transport
from the options passed to the constructor.
|
boolean |
isDebugEnabled() |
protected List<Message.Mutable> |
parseMessages(String content) |
abstract void |
send(TransportListener listener,
Message.Mutable... messages) |
void |
setDebugEnabled(boolean enabled) |
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
protected final org.slf4j.Logger logger
public void init()
public abstract void abort()
/meta/connects, without waiting for a response.org.cometd.client.BayeuxClient#abort()}public void terminate()
org.cometd.client.BayeuxClient#disconnect()}public boolean isDebugEnabled()
public void setDebugEnabled(boolean enabled)
public abstract boolean accept(String version)
public abstract void send(TransportListener listener, Message.Mutable... messages)
protected List<Message.Mutable> parseMessages(String content) throws ParseException
ParseExceptionprotected String generateJSON(Message.Mutable[] messages)
public long getMaxNetworkDelay()
protected void setMaxNetworkDelay(long maxNetworkDelay)
Copyright © 2008–2014 Dojo Foundation. All rights reserved.