Package org.cometd.server.http
Class JSONTransport
- java.lang.Object
-
- All Implemented Interfaces:
ServerTransport,Transport,org.eclipse.jetty.util.component.Dumpable
public class JSONTransport extends AbstractStreamHttpTransport
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.cometd.server.http.AbstractStreamHttpTransport
AbstractStreamHttpTransport.DispatchingLongPollScheduler
-
Nested classes/interfaces inherited from class org.cometd.server.http.AbstractHttpTransport
AbstractHttpTransport.Context, AbstractHttpTransport.HttpScheduler, AbstractHttpTransport.LongPollScheduler
-
Nested classes/interfaces inherited from class org.cometd.server.AbstractServerTransport
AbstractServerTransport.Scheduler
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAMEstatic java.lang.StringPREFIX-
Fields inherited from class org.cometd.server.http.AbstractHttpTransport
BROWSER_COOKIE_DOMAIN_OPTION, BROWSER_COOKIE_HTTP_ONLY_OPTION, BROWSER_COOKIE_MAX_AGE_OPTION, BROWSER_COOKIE_NAME_OPTION, BROWSER_COOKIE_PARTITIONED_OPTION, BROWSER_COOKIE_PATH_OPTION, BROWSER_COOKIE_SAME_SITE_OPTION, BROWSER_COOKIE_SECURE_OPTION, DUPLICATE_META_CONNECT_HTTP_RESPONSE_CODE_OPTION, HTTP2_MAX_SESSIONS_PER_BROWSER_OPTION, JSON_DEBUG_OPTION, MAX_SESSIONS_PER_BROWSER_OPTION, MESSAGE_PARAM, MULTI_SESSION_INTERVAL_OPTION, TRUST_CLIENT_SESSION_OPTION
-
Fields inherited from class org.cometd.server.AbstractServerTransport
ALLOW_MESSAGE_DELIVERY_DURING_HANDSHAKE, HANDSHAKE_RECONNECT_OPTION, INTERVAL_OPTION, JSON_CONTEXT_OPTION, MAX_INTERVAL_OPTION, MAX_LAZY_TIMEOUT_OPTION, MAX_MESSAGE_SIZE_OPTION, MAX_PROCESSING_OPTION, MAX_QUEUE_OPTION, META_CONNECT_DELIVERY_OPTION, TIMEOUT_OPTION
-
-
Constructor Summary
Constructors Constructor Description JSONTransport(BayeuxServerImpl bayeux)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(javax.servlet.http.HttpServletRequest request)protected javax.servlet.ServletOutputStreambeginWrite(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected voidendWrite(javax.servlet.http.HttpServletResponse response, javax.servlet.ServletOutputStream output)voidinit()Initializes the transport, resolving default and direct options.protected ServerMessage.Mutable[]parseMessages(javax.servlet.http.HttpServletRequest request)-
Methods inherited from class org.cometd.server.http.AbstractStreamHttpTransport
handle, newHttpScheduler, parseMessages, process, suspend, write, writeComplete, writeMessage, writeMessage
-
Methods inherited from class org.cometd.server.http.AbstractHttpTransport
decBrowserId, findBrowserId, findCurrentSessions, findSession, flush, getAsyncContext, getDuplicateMetaConnectHttpResponseCode, getMultiSessionInterval, handleJSONParseException, handleMessage, incBrowserId, isHTTP2, processMessages, resume, sendError, setBrowserId, sweep, toJSONBytes
-
Methods inherited from class org.cometd.server.AbstractServerTransport
allowMessageDeliveryDuringHandshake, destroy, dump, getBayeux, getInterval, getJSONContextServer, getMaxInterval, getMaxLazyTimeout, getMaxMessageSize, getTimeout, isAllowMessageDeliveryDuringHandshake, isHandshakeReconnect, isMetaConnectDeliveryOnly, newMetaConnectCycle, parseMessages, parseMessages, processReply, scheduleExpiration, setAllowMessageDeliveryDuringHandshake, setHandshakeReconnect, setInterval, setMaxInterval, setMaxLazyTimeout, setMaxMessageSize, setMetaConnectDeliveryOnly, setTimeout, toJSON, toString
-
Methods inherited from class org.cometd.common.AbstractTransport
getName, getOption, getOption, getOption, getOption, getOption, getOptionNames, getOptionPrefix, setOption, setOptionPrefix
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.cometd.bayeux.Transport
getName, getOption, getOptionNames, getOptionPrefix
-
-
-
-
Field Detail
-
PREFIX
public static final java.lang.String PREFIX
- See Also:
- Constant Field Values
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JSONTransport
public JSONTransport(BayeuxServerImpl bayeux)
-
-
Method Detail
-
init
public void init()
Description copied from class:AbstractServerTransportInitializes the transport, resolving default and direct options.- Overrides:
initin classAbstractHttpTransport
-
accept
public boolean accept(javax.servlet.http.HttpServletRequest request)
- Specified by:
acceptin classAbstractHttpTransport
-
parseMessages
protected ServerMessage.Mutable[] parseMessages(javax.servlet.http.HttpServletRequest request) throws java.io.IOException, java.text.ParseException
- Specified by:
parseMessagesin classAbstractStreamHttpTransport- Throws:
java.io.IOExceptionjava.text.ParseException
-
beginWrite
protected javax.servlet.ServletOutputStream beginWrite(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException- Specified by:
beginWritein classAbstractStreamHttpTransport- Throws:
java.io.IOException
-
endWrite
protected void endWrite(javax.servlet.http.HttpServletResponse response, javax.servlet.ServletOutputStream output) throws java.io.IOException- Specified by:
endWritein classAbstractStreamHttpTransport- Throws:
java.io.IOException
-
-