| 类 | 描述 | 
|---|---|
| HttpContext |  
          的HttpContext表示Web服务到的根URI路径之间的映射 HttpHandler被调用来处理目的地为相关的容器上的路径的请求。 | 
| HttpExchange | 
           此类封装了收到的HTTP请求和在一个交换中生成的响应。 
          | 
| HttpHandler | 
           被调用以处理HTTP请求的处理程序。 
          | 
便携式部署完成如下:
Endpoint对象。 创建端点对象的必要信息可能来自Web服务部署描述符文件。 HttpContext对象进行部署。 例如,可以使用servlet配置(例如url-pattern)在servlet容器情况下为Web服务创建HttpContext。 Endpoint.publish(HttpContext)发布所有端点 。 在publish()期间,JAX-WS运行时注册一个HttpHandler回调来处理传入请求或HttpExchange对象。 HttpExchange对象封装了HTTP请求和响应。   Container                               JAX-WS runtime
  ---------                               --------------
  1. Creates Invoker1, ... InvokerN
  2. Provider.createEndpoint(...)     --> 3. creates Endpoint1
     configures Endpoint1
     ...
  4. Provider.createEndpoint(...)     --> 5. creates EndpointN
     configures EndpointN
  6. Creates ApplicationContext
  7. creates HttpContext1, ... HttpContextN
  8. Endpoint1.publish(HttpContext1)  --> 9. creates HttpHandler1
                                          HttpContext1.setHandler(HttpHandler1)
     ...
 10. EndpointN.publish(HttpContextN)  --> 11. creates HttpHandlerN
                                         HttpContextN.setHandler(HttpHandlerN)  
    请求处理完成如下(对于每个请求): 
      Container                               JAX-WS runtime
  ---------                               --------------
  1. Creates a HttpExchange
  2. Gets handler from HttpContext
  3. HttpHandler.handle(HttpExchange) --> 4. reads request from HttpExchange
                                      <-- 5. Calls Invoker
  6. Invokes the actual instance
                                          7. Writes the response to HttpExchange  
    便携式取消部署完成如下:
  Container
  ---------
  1. @preDestroy on instances
  2. Endpoint1.stop()
  ...
  3. EndpointN.stop()  
    Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.