CXF Interceptor中Phase的先后顺序


org.apache.cxf.phase.PhaseManagerImpl中
final void createInPhases() {
int i = 0;

inPhases = new SortedArraySet<Phase>();
inPhases.add(new Phase(Phase.RECEIVE, ++i * 1000));
inPhases.add(new Phase(Phase.PRE_STREAM, ++i * 1000));
inPhases.add(new Phase(Phase.USER_STREAM, ++i * 1000));
inPhases.add(new Phase(Phase.POST_STREAM, ++i * 1000));
inPhases.add(new Phase(Phase.READ, ++i * 1000));
inPhases.add(new Phase(Phase.PRE_PROTOCOL, ++i * 1000));
inPhases.add(new Phase(Phase.USER_PROTOCOL, ++i * 1000));
inPhases.add(new Phase(Phase.POST_PROTOCOL, ++i * 1000));
inPhases.add(new Phase(Phase.UNMARSHAL, ++i * 1000));
inPhases.add(new Phase(Phase.PRE_LOGICAL, ++i * 1000));
inPhases.add(new Phase(Phase.USER_LOGICAL, ++i * 1000));
inPhases.add(new Phase(Phase.POST_LOGICAL, ++i * 1000));
inPhases.add(new Phase(Phase.PRE_INVOKE, ++i * 1000));
inPhases.add(new Phase(Phase.INVOKE, ++i * 1000));
inPhases.add(new Phase(Phase.POST_INVOKE, ++i * 1000));
}

final void createOutPhases() {

outPhases = new SortedArraySet<Phase>();
int i = 0;

outPhases.add(new Phase(Phase.SETUP, ++i * 1000));
outPhases.add(new Phase(Phase.PRE_LOGICAL, ++i * 1000));
outPhases.add(new Phase(Phase.USER_LOGICAL, ++i * 1000));
outPhases.add(new Phase(Phase.POST_LOGICAL, ++i * 1000));
outPhases.add(new Phase(Phase.PREPARE_SEND, ++i * 1000));

outPhases.add(new Phase(Phase.PRE_STREAM, ++i * 1000));

outPhases.add(new Phase(Phase.PRE_PROTOCOL, ++i * 1000));

outPhases.add(new Phase(Phase.WRITE, ++i * 1000));
outPhases.add(new Phase(Phase.PRE_MARSHAL, ++i * 1000));
outPhases.add(new Phase(Phase.MARSHAL, ++i * 1000));
outPhases.add(new Phase(Phase.POST_MARSHAL, ++i * 1000));

outPhases.add(new Phase(Phase.USER_PROTOCOL, ++i * 1000));
outPhases.add(new Phase(Phase.POST_PROTOCOL, ++i * 1000));

outPhases.add(new Phase(Phase.USER_STREAM, ++i * 1000));
outPhases.add(new Phase(Phase.POST_STREAM, ++i * 1000));

outPhases.add(new Phase(Phase.SEND, ++i * 1000));

//Make sure ending interceptors are put in positions symmetric
// to their starting interceptors
outPhases.add(new Phase(Phase.SEND_ENDING, ++i * 1000));

outPhases.add(new Phase(Phase.POST_STREAM_ENDING, ++i * 1000));
outPhases.add(new Phase(Phase.USER_STREAM_ENDING, ++i * 1000));

outPhases.add(new Phase(Phase.POST_PROTOCOL_ENDING, ++i * 1000));
outPhases.add(new Phase(Phase.USER_PROTOCOL_ENDING, ++i * 1000));

outPhases.add(new Phase(Phase.MARSHAL_ENDING, ++i * 1000));
outPhases.add(new Phase(Phase.WRITE_ENDING, ++i * 1000));

outPhases.add(new Phase(Phase.PRE_PROTOCOL_ENDING, ++i * 1000));

outPhases.add(new Phase(Phase.PRE_STREAM_ENDING, ++i * 1000));

outPhases.add(new Phase(Phase.PREPARE_SEND_ENDING, ++i * 1000));
outPhases.add(new Phase(Phase.POST_LOGICAL_ENDING, ++i * 1000));
outPhases.add(new Phase(Phase.USER_LOGICAL_ENDING, ++i * 1000));
outPhases.add(new Phase(Phase.PRE_LOGICAL_ENDING, ++i * 1000));
outPhases.add(new Phase(Phase.SETUP_ENDING, ++i * 1000));

}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值