Package org.cometd.client.transport
Class ClientTransport
java.lang.Object
org.cometd.common.AbstractTransport
org.cometd.client.transport.ClientTransport
- All Implemented Interfaces:
Transport
- Direct Known Subclasses:
HttpClientTransport
public abstract class ClientTransport extends AbstractTransport
ClientTransport
s are used by BayeuxClient
to send and receive Bayeux messages.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ClientTransport.Factory
static interface
ClientTransport.FailureHandler
static class
ClientTransport.FailureInfo
-
Field Summary
Fields Modifier and Type Field Description static String
JSON_CONTEXT_OPTION
protected org.slf4j.Logger
logger
static String
MAX_MESSAGE_SIZE_OPTION
static String
MAX_NETWORK_DELAY_OPTION
static String
SCHEDULER_OPTION
static String
URL_OPTION
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description abstract void
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.abstract boolean
accept(String version)
protected String
generateJSON(List<Message.Mutable> messages)
long
getMaxNetworkDelay()
String
getURL()
void
init()
protected List<Message.Mutable>
parseMessages(String content)
abstract void
send(TransportListener listener, List<Message.Mutable> messages)
protected void
setMaxNetworkDelay(long maxNetworkDelay)
void
setURL(String url)
void
terminate()
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:
- 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_MESSAGE_SIZE_OPTION
- See Also:
- Constant Field Values
-
logger
protected final org.slf4j.Logger logger
-
-
Constructor Details
-
Method Details
-
getURL
-
setURL
-
init
public void init() -
abort
public abstract void 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.- See Also:
BayeuxClient.abort()
-
terminate
public void terminate()Terminates this transport, usually by closing network connections opened directly by this transport.- See Also:
BayeuxClient.disconnect()
-
accept
-
send
-
parseMessages
- Throws:
ParseException
-
generateJSON
-
getMaxNetworkDelay
public long getMaxNetworkDelay() -
setMaxNetworkDelay
protected void setMaxNetworkDelay(long maxNetworkDelay)
-