1. org.apache.cxf.phase.PhaseManagerImpl中
  2. final void createInPhases() {
  3. int i = 0;
  4. inPhases = new SortedArraySet<Phase>();
  5. inPhases.add(new Phase(Phase.RECEIVE, ++i * 1000));
  6. inPhases.add(new Phase(Phase.PRE_STREAM, ++i * 1000));
  7. inPhases.add(new Phase(Phase.USER_STREAM, ++i * 1000));
  8. inPhases.add(new Phase(Phase.POST_STREAM, ++i * 1000));
  9. inPhases.add(new Phase(Phase.READ, ++i * 1000));
  10. inPhases.add(new Phase(Phase.PRE_PROTOCOL, ++i * 1000));
  11. inPhases.add(new Phase(Phase.USER_PROTOCOL, ++i * 1000));
  12. inPhases.add(new Phase(Phase.POST_PROTOCOL, ++i * 1000));
  13. inPhases.add(new Phase(Phase.UNMARSHAL, ++i * 1000));
  14. inPhases.add(new Phase(Phase.PRE_LOGICAL, ++i * 1000));
  15. inPhases.add(new Phase(Phase.USER_LOGICAL, ++i * 1000));
  16. inPhases.add(new Phase(Phase.POST_LOGICAL, ++i * 1000));
  17. inPhases.add(new Phase(Phase.PRE_INVOKE, ++i * 1000));
  18. inPhases.add(new Phase(Phase.INVOKE, ++i * 1000));
  19. inPhases.add(new Phase(Phase.POST_INVOKE, ++i * 1000));
  20. }
  21. final void createOutPhases() {
  22. outPhases = new SortedArraySet<Phase>();
  23. int i = 0;
  24. outPhases.add(new Phase(Phase.SETUP, ++i * 1000));
  25. outPhases.add(new Phase(Phase.PRE_LOGICAL, ++i * 1000));
  26. outPhases.add(new Phase(Phase.USER_LOGICAL, ++i * 1000));
  27. outPhases.add(new Phase(Phase.POST_LOGICAL, ++i * 1000));
  28. outPhases.add(new Phase(Phase.PREPARE_SEND, ++i * 1000));
  29. outPhases.add(new Phase(Phase.PRE_STREAM, ++i * 1000));
  30. outPhases.add(new Phase(Phase.PRE_PROTOCOL, ++i * 1000));
  31. outPhases.add(new Phase(Phase.WRITE, ++i * 1000));
  32. outPhases.add(new Phase(Phase.PRE_MARSHAL, ++i * 1000));
  33. outPhases.add(new Phase(Phase.MARSHAL, ++i * 1000));
  34. outPhases.add(new Phase(Phase.POST_MARSHAL, ++i * 1000));
  35. outPhases.add(new Phase(Phase.USER_PROTOCOL, ++i * 1000));
  36. outPhases.add(new Phase(Phase.POST_PROTOCOL, ++i * 1000));
  37. outPhases.add(new Phase(Phase.USER_STREAM, ++i * 1000));
  38. outPhases.add(new Phase(Phase.POST_STREAM, ++i * 1000));
  39. outPhases.add(new Phase(Phase.SEND, ++i * 1000));
  40. //Make sure ending interceptors are put in positions symmetric
  41. // to their starting interceptors
  42. outPhases.add(new Phase(Phase.SEND_ENDING, ++i * 1000));
  43. outPhases.add(new Phase(Phase.POST_STREAM_ENDING, ++i * 1000));
  44. outPhases.add(new Phase(Phase.USER_STREAM_ENDING, ++i * 1000));
  45. outPhases.add(new Phase(Phase.POST_PROTOCOL_ENDING, ++i * 1000));
  46. outPhases.add(new Phase(Phase.USER_PROTOCOL_ENDING, ++i * 1000));
  47. outPhases.add(new Phase(Phase.MARSHAL_ENDING, ++i * 1000));
  48. outPhases.add(new Phase(Phase.WRITE_ENDING, ++i * 1000));
  49. outPhases.add(new Phase(Phase.PRE_PROTOCOL_ENDING, ++i * 1000));
  50. outPhases.add(new Phase(Phase.PRE_STREAM_ENDING, ++i * 1000));
  51. outPhases.add(new Phase(Phase.PREPARE_SEND_ENDING, ++i * 1000));
  52. outPhases.add(new Phase(Phase.POST_LOGICAL_ENDING, ++i * 1000));
  53. outPhases.add(new Phase(Phase.USER_LOGICAL_ENDING, ++i * 1000));
  54. outPhases.add(new Phase(Phase.PRE_LOGICAL_ENDING, ++i * 1000));
  55. outPhases.add(new Phase(Phase.SETUP_ENDING, ++i * 1000));
  56. }

另外,如果级别一样,则按照配置的先后顺序进行拦截。顺序是<javaxws:interceptors></javaxws:interceptors>标签内出现的顺序。

CXF interceptor拦截顺序的更多相关文章

  1. CXF之五 拦截器Interceptor

    拦截器(Interceptor)是CXF功能最主要的扩展点,可以在不对核心模块进行修改的情况下,动态添加很多功能.拦截器和JAX-WS Handler.Filter的功能类似,当服务被调用时,就会创建 ...

  2. CXF对Interceptor拦截器的支持

    前面在Axis中介绍过Axis的Handler,这里CXF的Interceptor就和Handler的功能类似.在每个请求响应之前或响应之后,做一些事情.这里的Interceptor就和Filter. ...

  3. SpringMVC中使用Interceptor拦截器顺序

    一.简介 SpringMVC 中的Interceptor 拦截器也是相当重要和相当有用的,它的主要作用是拦截用户的请求并进行相应的处理.比如通过它来进行权限验 证,或者是来判断用户是否登陆,或者是像1 ...

  4. 【CXF】- 拦截器 Interceptor

    CXF拦截器 拦截动态操作请求和响应数据 拦截器分类 位置:服务器端拦截器,客户端拦截器 消息方向:入拦截器 出拦截器 定义者:系统拦截器 自定义拦截器:LoggingInInteceptor ①:创 ...

  5. SpringMVC中使用Interceptor拦截器

    SpringMVC 中的Interceptor 拦截器也是相当重要和相当有用的,它的主要作用是拦截用户的请求并进行相应的处理.比如通过它来进行权限验证,或者是来判断用户是否登陆,或者是像12306 那 ...

  6. Apache CXF自定义拦截器

    为什么设计拦截器?1.为了在webservice请求过程中,能动态操作请求和响应数据,CXF设计了拦截器 拦截器分类: 1.按所处的位置分:服务器端拦截器,客户端拦截器. 2.按消息的方向分:入拦截器 ...

  7. CXF 自定义拦截器

    此例子来自apache cxf sample. /**  * Licensed to the Apache Software Foundation (ASF) under one  * or more ...

  8. Spring MVC中使用Interceptor拦截器

    SpringMVC 中的Interceptor 拦截器也是相当重要和相当有用的,它的主要作用是拦截用户的请求并进行相应的处理.比如通过它来进行权限验证,或者是来判断用户是否登陆,或者是像12306 那 ...

  9. SpringMVC 中的Interceptor 拦截器

    1.配置拦截器 在springMVC.xml配置文件增加: <mvc:interceptors>  <!-- 日志拦截器 -->  <mvc:interceptor> ...

随机推荐

  1. java File的getLastModified在不同操作系统以下存在差异

    java对文件读取改动时间(getLastModified())在不同的操作系统下存在差异  //1.在windows下,返回值是毫秒级别,不存在问题 //2.在Linux下,返回的值是毫秒值,可是会 ...

  2. 基于angularJS和requireJS的前端架构

    1.概要描述 1.1.angularJS描述:angularJS是可以用来构建WEB应用的,WEB应用中的一种端对端的完整解决方案.通过开发者呈现一个更高层次的抽象来简化应用的开发.最适合的就是用它来 ...

  3. winform —— listview创建表及简单的增删改查

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  4. Bootstrap的datepicker控件

    为input 控件的text 添加datepicker()方法后,原本的控件change事件无法正常触发.原因是项目中同时使用了用了jquery ui,碰巧它里面也有一个datepicker,名字一模 ...

  5. SQL判断是否存在符合某条件的记录

    IF EXISTS ( --判断是否存在合符条件的记录 ) FROM [DCL].[SecurityUser] WHERE [UserAccount] = @UserAccount ) BEGIN - ...

  6. AjaxHelper创建的ajax无效,JQuery直接方法post有效,原来是Microsoft.jQuery.Unobtrusive.Ajax错误,NuGet解决

    Get-Package -ListAvailable -Filter Microsoft.JQuery Microsoft.jQuery.Unobtrusive.Ajax –Version 3.2.0

  7. CDZSC_2015寒假新人(1)——基础 e

    Description Julius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever ...

  8. win7使用右键导致死机、假死、explorer无法响应的解决方法

    右键引起explorer无法响应,奔溃,主要是由于COMCTL32.DLL和COMCTL21.OCX文件引起的 描述:comctl32.dll是Windows应用程序公用GUI图形用户界面模块.报告提 ...

  9. Android sample 之模拟重力感应,加速度

    class SimulationView extends View implements SensorEventListener { // diameter of the balls in meter ...

  10. 微软源代码管理工具TFS2013安装与使用图文教程

    微软源代码管理工具TFS2013安装与使用图文教程 这篇文章主要介绍了微软源代码管理工具TFS2013安装与使用图文教程,本文详细的给出了TFS2013的安装配置过程.使用教程,需要的朋友可以参考下 ...