Package org.cometd.server.http
Class JSONTransport
java.lang.Object
- All Implemented Interfaces:
ServerTransport,org.cometd.bayeux.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.DispatchingLongPollSchedulerNested classes/interfaces inherited from class org.cometd.server.http.AbstractHttpTransport
AbstractHttpTransport.Context, AbstractHttpTransport.HttpScheduler, AbstractHttpTransport.LongPollSchedulerNested classes/interfaces inherited from class org.cometd.server.AbstractServerTransport
AbstractServerTransport.SchedulerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
org.eclipse.jetty.util.component.Dumpable.DumpableContainer -
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAMEstatic java.lang.StringPREFIXFields inherited from class org.cometd.server.http.AbstractHttpTransport
BROWSER_COOKIE_DOMAIN_OPTION, BROWSER_COOKIE_HTTP_ONLY_OPTION, BROWSER_COOKIE_NAME_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_OPTIONFields 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_OPTIONFields inherited from interface org.eclipse.jetty.util.component.Dumpable
KEY -
Constructor Summary
Constructors Constructor Description JSONTransport(BayeuxServerImpl bayeux) -
Method Summary
Modifier and Type Method Description booleanaccept(jakarta.servlet.http.HttpServletRequest request)protected jakarta.servlet.ServletOutputStreambeginWrite(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)protected voidendWrite(jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.ServletOutputStream output)voidinit()Initializes the transport, resolving default and direct options.protected ServerMessage.Mutable[]parseMessages(jakarta.servlet.http.HttpServletRequest request)Methods inherited from class org.cometd.server.http.AbstractStreamHttpTransport
handle, newHttpScheduler, parseMessages, process, suspend, write, writeComplete, writeMessage, writeMessageMethods 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, toJSONBytesMethods 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, toStringMethods inherited from class org.cometd.common.AbstractTransport
getName, getOption, getOption, getOption, getOption, getOption, getOptionNames, getOptionPrefix, setOption, setOptionPrefixMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.component.Dumpable
dump, dumpSelfMethods inherited from interface org.cometd.bayeux.Transport
getName, getOption, getOptionNames, getOptionPrefix
-
Field Details
-
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 Details
-
JSONTransport
-
-
Method Details
-
init
public void init()Description copied from class:AbstractServerTransportInitializes the transport, resolving default and direct options.- Overrides:
initin classAbstractHttpTransport
-
accept
public boolean accept(jakarta.servlet.http.HttpServletRequest request)- Specified by:
acceptin classAbstractHttpTransport
-
parseMessages
protected ServerMessage.Mutable[] parseMessages(jakarta.servlet.http.HttpServletRequest request) throws java.io.IOException, java.text.ParseException- Specified by:
parseMessagesin classAbstractStreamHttpTransport- Throws:
java.io.IOExceptionjava.text.ParseException
-
beginWrite
protected jakarta.servlet.ServletOutputStream beginWrite(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws java.io.IOException- Specified by:
beginWritein classAbstractStreamHttpTransport- Throws:
java.io.IOException
-
endWrite
protected void endWrite(jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.ServletOutputStream output) throws java.io.IOException- Specified by:
endWritein classAbstractStreamHttpTransport- Throws:
java.io.IOException
-