Class AbstractStreamHttpTransport

  • All Implemented Interfaces:
    org.cometd.bayeux.server.ServerTransport, org.cometd.bayeux.Transport, org.eclipse.jetty.util.component.Dumpable
    Direct Known Subclasses:
    JSONPTransport, JSONTransport

    public abstract class AbstractStreamHttpTransport
    extends AbstractHttpTransport

    The base class for HTTP transports that use blocking stream I/O.

    • Constructor Detail

      • AbstractStreamHttpTransport

        protected AbstractStreamHttpTransport​(BayeuxServerImpl bayeux,
                                              java.lang.String name)
    • Method Detail

      • handle

        public void handle​(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
                    throws java.io.IOException,
                           javax.servlet.ServletException
        Specified by:
        handle in class AbstractHttpTransport
        Throws:
        java.io.IOException
        javax.servlet.ServletException
      • parseMessages

        protected abstract org.cometd.bayeux.server.ServerMessage.Mutable[] parseMessages​(javax.servlet.http.HttpServletRequest request)
                                                                                   throws java.io.IOException,
                                                                                          java.text.ParseException
        Throws:
        java.io.IOException
        java.text.ParseException
      • parseMessages

        protected org.cometd.bayeux.server.ServerMessage.Mutable[] parseMessages​(java.lang.String[] requestParameters)
                                                                          throws java.io.IOException,
                                                                                 java.text.ParseException
        Throws:
        java.io.IOException
        java.text.ParseException
      • writeMessage

        protected void writeMessage​(javax.servlet.http.HttpServletResponse response,
                                    javax.servlet.ServletOutputStream output,
                                    ServerSessionImpl session,
                                    org.cometd.bayeux.server.ServerMessage message)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • beginWrite

        protected abstract javax.servlet.ServletOutputStream beginWrite​(javax.servlet.http.HttpServletRequest request,
                                                                        javax.servlet.http.HttpServletResponse response)
                                                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • endWrite

        protected abstract void endWrite​(javax.servlet.http.HttpServletResponse response,
                                         javax.servlet.ServletOutputStream output)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • writeComplete

        protected void writeComplete​(AbstractHttpTransport.Context context,
                                     java.util.List<org.cometd.bayeux.server.ServerMessage> messages)