程序包 qhs.interfaces

接口 HTTPServiceModule


  • public interface HTTPServiceModule

    HTTPServiceModule接口用于实现HTTP服务模块类。

    • 方法概要

      所有方法 实例方法 抽象方法 
      修饰符和类型 方法 说明
      void clear()
      clear()实例方法用于清除HTTP服务模块的内部状态。
      java.lang.String getID()
      返回HTTP服务模块的ID。
      void invoke​(ThreadContext tc, Connection conn)
      qhs通过调用invoke()实例方法来构建http答复。
      void push​(ThreadContext tc, Connection conn)
      qhs通过调用push()实例方法来构建推送答复。
      java.lang.String update​(java.lang.String str)
      update()实例方法用于更新服务模块的内部状态。
    • 方法详细资料

      • getID

        java.lang.String getID()
                        throws java.lang.Throwable
        返回HTTP服务模块的ID。
        返回:
        HTTP服务模块的ID。
        抛出:
        java.lang.Throwable
      • invoke

        void invoke​(ThreadContext tc,
                    Connection conn)
             throws java.lang.Throwable
        qhs通过调用invoke()实例方法来构建http答复。在invoke()方法的内部应放置 有构建http答复的代码。
        参数:
        tc - 线程上下文。
        conn - http连接。
        抛出:
        java.lang.Throwable
      • push

        void push​(ThreadContext tc,
                  Connection conn)
           throws java.lang.Throwable
        qhs通过调用push()实例方法来构建推送答复。在push()方法的内部应放置有构建推送答复的代码。
        参数:
        tc - 线程上下文。
        conn - http连接。
        抛出:
        java.lang.Throwable
      • update

        java.lang.String update​(java.lang.String str)
                         throws java.lang.Throwable
        update()实例方法用于更新服务模块的内部状态。用户代码通过调用定义在httpServiceModulePool 系统对象上的updateServiceModule()方法来更新服务模块的内部状态,updateServiceModule()方法 直接调用此处说明的update()方法。
        参数:
        str - 任意字符串。
        返回:
        返回值可任意。本方法的返回值通过httpServiceModulePool.updateServiceModule()传递给用户代码。
        抛出:
        java.lang.Throwable
      • clear

        void clear()
            throws java.lang.Throwable
        clear()实例方法用于清除HTTP服务模块的内部状态。在qhs终止运行的过程中,qhs调用clear()方法。
        抛出:
        java.lang.Throwable