org.glassfish.jersey.server.internal
Class MappableExceptionWrapperInterceptor

java.lang.Object
  extended by org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor
All Implemented Interfaces:
javax.ws.rs.ext.ReaderInterceptor, javax.ws.rs.ext.WriterInterceptor

@Priority(value=10)
@Singleton
public class MappableExceptionWrapperInterceptor
extends Object
implements javax.ws.rs.ext.ReaderInterceptor, javax.ws.rs.ext.WriterInterceptor

Interceptor that wraps specific exceptions types thrown by wrapped interceptors and by message body readers and writers into a mappable exception. It must have the lowest priority in order to wrap all other interceptors.

Author:
Miroslav Fuksa (miroslav.fuksa at oracle.com)

Nested Class Summary
static class MappableExceptionWrapperInterceptor.Binder
          Binder registering the Exception Wrapper Interceptor (used on the client side).
 
Constructor Summary
MappableExceptionWrapperInterceptor()
           
 
Method Summary
 Object aroundReadFrom(javax.ws.rs.ext.ReaderInterceptorContext context)
           
 void aroundWriteTo(javax.ws.rs.ext.WriterInterceptorContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappableExceptionWrapperInterceptor

public MappableExceptionWrapperInterceptor()
Method Detail

aroundReadFrom

public Object aroundReadFrom(javax.ws.rs.ext.ReaderInterceptorContext context)
                      throws IOException,
                             javax.ws.rs.WebApplicationException
Specified by:
aroundReadFrom in interface javax.ws.rs.ext.ReaderInterceptor
Throws:
IOException
javax.ws.rs.WebApplicationException

aroundWriteTo

public void aroundWriteTo(javax.ws.rs.ext.WriterInterceptorContext context)
                   throws IOException,
                          javax.ws.rs.WebApplicationException
Specified by:
aroundWriteTo in interface javax.ws.rs.ext.WriterInterceptor
Throws:
IOException
javax.ws.rs.WebApplicationException


Copyright © 2007-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.