Class XHRTransport.XHRSessionHelper

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void abort()
      Cause connection and all activity to be aborted and all resources to be released.
      void close()
      force close connection
      void connect​(org.atmosphere.cpr.AtmosphereResourceImpl resource)  
      protected abstract void customConnect​(org.atmosphere.cpr.AtmosphereRequest request, org.atmosphere.cpr.AtmosphereResponse response)  
      void disconnect()
      disconnect the current connection
      protected abstract void finishSend​(org.atmosphere.cpr.AtmosphereResponse response)  
      java.lang.String getSessionId()  
      org.atmosphere.cpr.Action handle​(org.atmosphere.cpr.AtmosphereRequest request, org.atmosphere.cpr.AtmosphereResponse response, SocketIOSession session)  
      void sendMessage​(java.lang.String message)
      Send a message to the client.
      void sendMessage​(java.util.List<SocketIOPacketImpl> messages)
      Send messages to the client.
      void sendMessage​(SocketIOPacket packet)
      Send a message to the client formatted is SocketIO format.
      protected abstract void startSend​(org.atmosphere.cpr.AtmosphereResponse response)  
      protected abstract void writeData​(org.atmosphere.cpr.AtmosphereResponse response, java.lang.String data)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • startSend

        protected abstract void startSend​(org.atmosphere.cpr.AtmosphereResponse response)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • writeData

        protected abstract void writeData​(org.atmosphere.cpr.AtmosphereResponse response,
                                          java.lang.String data)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • finishSend

        protected abstract void finishSend​(org.atmosphere.cpr.AtmosphereResponse response)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • sendMessage

        public void sendMessage​(java.lang.String message)
                         throws SocketIOException
        Description copied from interface: SocketIOOutbound
        Send a message to the client. If the session is still active, the message will be cached if the connection is closed.
        Specified by:
        sendMessage in interface SocketIOOutbound
        Parameters:
        message - The message to send
        Throws:
        SocketIOException
      • handle

        public org.atmosphere.cpr.Action handle​(org.atmosphere.cpr.AtmosphereRequest request,
                                                org.atmosphere.cpr.AtmosphereResponse response,
                                                SocketIOSession session)
                                         throws java.io.IOException
        Specified by:
        handle in interface SocketIOSessionOutbound
        Returns:
        Throws:
        java.io.IOException
      • customConnect

        protected abstract void customConnect​(org.atmosphere.cpr.AtmosphereRequest request,
                                              org.atmosphere.cpr.AtmosphereResponse response)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • connect

        public void connect​(org.atmosphere.cpr.AtmosphereResourceImpl resource)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • abort

        public void abort()
        Description copied from interface: SocketIOSessionOutbound
        Cause connection and all activity to be aborted and all resources to be released. The handler is expected to call the session's onShutdown() when it is finished. The only session method that the handler can legally call after this is onShutdown();
        Specified by:
        abort in interface SocketIOSessionOutbound