org.jboss.wsf.spi.deployment.Endpoint.getRequestHandler()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(147)

本文整理了Java中org.jboss.wsf.spi.deployment.Endpoint.getRequestHandler()方法的一些代码示例,展示了Endpoint.getRequestHandler()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Endpoint.getRequestHandler()方法的具体详情如下:
包路径:org.jboss.wsf.spi.deployment.Endpoint
类名称:Endpoint
方法名:getRequestHandler

Endpoint.getRequestHandler介绍

[英]Get the request handler for this endpoint
[中]获取此端点的请求处理程序

代码示例

代码示例来源:origin: org.jboss.ws.native/jbossws-native-core

  1. /**
  2. * Serves the requests
  3. */
  4. public final void service(HttpServletRequest req, HttpServletResponse res)
  5. throws ServletException, IOException
  6. {
  7. try
  8. {
  9. EndpointAssociation.setEndpoint(endpoint);
  10. RequestHandler requestHandler = endpoint.getRequestHandler();
  11. requestHandler.handleHttpRequest(endpoint, req, res, getServletContext());
  12. }
  13. finally
  14. {
  15. this.postService();
  16. EndpointAssociation.removeEndpoint();
  17. }
  18. }

代码示例来源:origin: org.jboss.ws.cxf/jbossws-cxf-server

  1. public static void callRequestHandler(HttpServletRequest req, HttpServletResponse res, ServletContext ctx, Bus bus,
  2. Endpoint endpoint) throws ServletException
  3. {
  4. try
  5. {
  6. BusFactory.setThreadDefaultBus(bus);
  7. //set the current endpoint into the threadlocal association that is later
  8. //used by the EndpointAssociationInterceptor for linking the message exchange
  9. //related to this invocation to the proper endpoint serving it (the bus, and
  10. //hence the interceptor, can span multiple invocation related to multiple
  11. //endpoints)
  12. EndpointAssociation.setEndpoint(endpoint);
  13. RequestHandler requestHandler = (RequestHandler) endpoint.getRequestHandler();
  14. requestHandler.handleHttpRequest(endpoint, req, res, ctx);
  15. }
  16. catch (IOException ioe)
  17. {
  18. throw new ServletException(ioe);
  19. }
  20. finally
  21. {
  22. if (endpoint.getSecurityDomainContext() != null) {
  23. endpoint.getSecurityDomainContext().cleanupSubjectContext();
  24. }
  25. EndpointAssociation.removeEndpoint();
  26. BusFactory.setThreadDefaultBus(null);
  27. }
  28. }
  29. }

相关文章