Samples JDK
OutSecurityFaultInterceptor.java
1 package com.freemindcafe.apache.cxf.jaxrs.sample9;
2 
3 import org.apache.cxf.interceptor.Fault;
4 import org.apache.cxf.message.XMLMessage;
5 import org.apache.cxf.phase.AbstractPhaseInterceptor;
6 import org.apache.cxf.phase.Phase;
7 import org.apache.log4j.Logger;
8 
9 /***
10  *
11  * @author KOMAN00S
12  *
13  */
14 //Phase.PRE_PROTOCOL
15 public class OutSecurityFaultInterceptor extends AbstractPhaseInterceptor<XMLMessage> {
16 
17  protected Logger logger = Logger.getLogger(OutSecurityFaultInterceptor.class);
18 
20  super(Phase.PRE_PROTOCOL);
21  }
22 
23  @Override
24  public void handleMessage(XMLMessage arg0) throws Fault {
25  System.out.println("OutSecurityFaultInterceptor-----------------");
26  //SecurityContextHolder.getContext().setAuthentication(null);
27  //SessionHolder.setSession(null);
28  }
29 
30 }