Class LongpollTransportServlet.LongpollSession

All Implemented Interfaces:
com.levigo.jadice.web.transport.server.session.internal.TransportSession
Enclosing class:
LongpollTransportServlet

public class LongpollTransportServlet.LongpollSession extends AbstractTransportServlet<LongpollTransportServlet.LongpollSession>.AbstractTransportSession
Represents a longpoll session for a single client.
  • Constructor Details

  • Method Details

    • dispatch

      public boolean dispatch(com.levigo.jadice.web.transport.server.session.internal.ServerToClientMessage message)
      Description copied from interface: com.levigo.jadice.web.transport.server.session.internal.TransportSession
      Try to dispatch a message via the transport connection to the connected client. Return true if dispatching was successful, false otherwise.
      Parameters:
      message - that should be sent to the client.
      Returns:
      true if message could be forwarded, false otherwise
    • getMethod

      public Method getMethod()
      Description copied from interface: com.levigo.jadice.web.transport.server.session.internal.TransportSession
      Return the method used to communicate with the client, i.e. the kind of transport that is used.
      Returns:
      The current communication method of client.
    • service

      public void service(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, long lastEventId) throws IOException, jakarta.servlet.ServletException
      Services requests from the LongpollTransportServlet.

      TODO remove unused variable #isExistingClientSession

      Parameters:
      request - The HttpServletRequest of the client.
      response - The HttpServletRequest of the server.
      lastEventId - The last event id, extracted from the request.
      Throws:
      IOException - If an error occurred trying to read the request message.
      jakarta.servlet.ServletException - When the size of the message received is greater then AbstractTransportServlet.getMaxMessageSize() bytes.
    • shutdown

      public void shutdown()
      Description copied from interface: com.levigo.jadice.web.transport.server.session.internal.TransportSession
      Perform a server-initiated shutdown of the transport session.
      Specified by:
      shutdown in interface com.levigo.jadice.web.transport.server.session.internal.TransportSession
      Specified by:
      shutdown in class AbstractTransportServlet<LongpollTransportServlet.LongpollSession>.AbstractTransportSession