Package org.cometd.server.http
Class AbstractStreamHttpTransport
java.lang.Object
org.cometd.common.AbstractTransport
org.cometd.server.AbstractServerTransport
org.cometd.server.http.AbstractHttpTransport
org.cometd.server.http.AbstractStreamHttpTransport
- All Implemented Interfaces:
ServerTransport
,Transport
,org.eclipse.jetty.util.component.Dumpable
- Direct Known Subclasses:
JSONPTransport
,JSONTransport
The base class for HTTP transports that use blocking stream I/O.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
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
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
org.eclipse.jetty.util.component.Dumpable.DumpableContainer
-
Field Summary
Fields 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, PREFIX, 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
Fields inherited from interface org.eclipse.jetty.util.component.Dumpable
KEY
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractStreamHttpTransport
(BayeuxServerImpl bayeux, String name) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract jakarta.servlet.ServletOutputStream
beginWrite
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) protected abstract void
endWrite
(jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.ServletOutputStream output) void
handle
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) protected AbstractHttpTransport.HttpScheduler
newHttpScheduler
(AbstractHttpTransport.Context context, Promise<Void> promise, ServerMessage.Mutable message, long timeout) protected abstract ServerMessage.Mutable[]
parseMessages
(jakarta.servlet.http.HttpServletRequest request) protected ServerMessage.Mutable[]
parseMessages
(String[] requestParameters) protected void
process
(AbstractHttpTransport.Context context, Promise<Void> promise) protected AbstractHttpTransport.HttpScheduler
suspend
(AbstractHttpTransport.Context context, Promise<Void> promise, ServerMessage.Mutable message, long timeout) protected void
write
(AbstractHttpTransport.Context context, List<ServerMessage> messages, Promise<Void> promise) protected void
writeComplete
(AbstractHttpTransport.Context context, List<ServerMessage> messages) protected void
writeMessage
(jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.ServletOutputStream output, ServerSessionImpl session, ServerMessage message) protected void
writeMessage
(AbstractHttpTransport.Context context, jakarta.servlet.ServletOutputStream output, ServerMessage message) Methods inherited from class org.cometd.server.http.AbstractHttpTransport
accept, decBrowserId, findBrowserId, findCurrentSessions, findSession, flush, getAsyncContext, getDuplicateMetaConnectHttpResponseCode, getMultiSessionInterval, handleJSONParseException, handleMessage, incBrowserId, init, 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.eclipse.jetty.util.component.Dumpable
dump, dumpSelf
Methods inherited from interface org.cometd.bayeux.Transport
getName, getOption, getOptionNames, getOptionPrefix
-
Constructor Details
-
AbstractStreamHttpTransport
-
-
Method Details
-
handle
public void handle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) - Specified by:
handle
in classAbstractHttpTransport
-
process
-
suspend
protected AbstractHttpTransport.HttpScheduler suspend(AbstractHttpTransport.Context context, Promise<Void> promise, ServerMessage.Mutable message, long timeout) - Specified by:
suspend
in classAbstractHttpTransport
-
newHttpScheduler
protected AbstractHttpTransport.HttpScheduler newHttpScheduler(AbstractHttpTransport.Context context, Promise<Void> promise, ServerMessage.Mutable message, long timeout) -
parseMessages
protected abstract ServerMessage.Mutable[] parseMessages(jakarta.servlet.http.HttpServletRequest request) throws IOException, ParseException - Throws:
IOException
ParseException
-
parseMessages
protected ServerMessage.Mutable[] parseMessages(String[] requestParameters) throws IOException, ParseException - Throws:
IOException
ParseException
-
write
protected void write(AbstractHttpTransport.Context context, List<ServerMessage> messages, Promise<Void> promise) - Specified by:
write
in classAbstractHttpTransport
-
writeMessage
protected void writeMessage(AbstractHttpTransport.Context context, jakarta.servlet.ServletOutputStream output, ServerMessage message) throws IOException - Throws:
IOException
-
writeMessage
protected void writeMessage(jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.ServletOutputStream output, ServerSessionImpl session, ServerMessage message) throws IOException - Throws:
IOException
-
beginWrite
protected abstract jakarta.servlet.ServletOutputStream beginWrite(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException - Throws:
IOException
-
endWrite
protected abstract void endWrite(jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.ServletOutputStream output) throws IOException - Throws:
IOException
-
writeComplete
-