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
ClientTransports are used by BayeuxClient to send and receive Bayeux messages.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceClientTransport.Factorystatic interfaceClientTransport.FailureHandlerstatic classClientTransport.FailureInfo -
Field Summary
Fields Modifier and Type Field Description static StringJSON_CONTEXT_OPTIONprotected org.slf4j.Loggerloggerstatic StringMAX_MESSAGE_SIZE_OPTIONstatic StringMAX_NETWORK_DELAY_OPTIONstatic StringSCHEDULER_OPTIONstatic StringURL_OPTION -
Constructor Summary
-
Method Summary
Modifier and Type Method Description abstract voidabort()Aborts this transport, usually by cancelling all pending Bayeux messages that require a response, such as/meta/connects, without waiting for a response.abstract booleanaccept(String version)protected StringgenerateJSON(List<Message.Mutable> messages)longgetMaxNetworkDelay()StringgetURL()voidinit()protected List<Message.Mutable>parseMessages(String content)abstract voidsend(TransportListener listener, List<Message.Mutable> messages)protected voidsetMaxNetworkDelay(long maxNetworkDelay)voidsetURL(String url)voidterminate()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/connects, 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)
-