cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neal hu <nbq...@163.com>
Subject Re: Using Interceptors on JAX-RS 2.0 Client
Date Tue, 22 Mar 2016 02:59:46 GMT
    public class CustomWriterInterceptor implements WriterInterceptor {

        
        @Override
        public void aroundWriteTo(WriterInterceptorContext context)
                        throws IOException, WebApplicationException {
            context.getHeaders().add("", "");
            context.getHeaders().putSingle("",
                                           "");
            //do your login logic
            context.proceed();
        }

    }

do your logout in readerInterceptor.

Neal



--
View this message in context: http://cxf.547215.n5.nabble.com/Using-Interceptors-on-JAX-RS-2-0-Client-tp5767089p5767090.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Mime
View raw message