org.jboss.resteasy.core.interception

## Class WriterInterceptorRegistry.WriterInterceptorFacade

- java.lang.Object
- - org.jboss.resteasy.core.interception.WriterInterceptorRegistry.WriterInterceptorFacade

- All Implemented Interfaces:
    WriterInterceptor
  Enclosing class:
    WriterInterceptorRegistry

      public static class WriterInterceptorRegistry.WriterInterceptorFacade
      extends Object
      implements WriterInterceptor

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected MessageBodyWriterInterceptor` | `interceptor`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WriterInterceptorRegistry.WriterInterceptorFacade(MessageBodyWriterInterceptor interceptor)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `aroundWriteTo(WriterInterceptorContext writerInterceptorContext)` Interceptor method wrapping calls to `MessageBodyWriter.writeTo(T, java.lang.Class<?>, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.Object>, java.io.OutputStream)` method.
    `MessageBodyWriterInterceptor` | `getInterceptor()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### interceptor

          protected final MessageBodyWriterInterceptor interceptor

  - ### Constructor Detail

    - #### WriterInterceptorRegistry.WriterInterceptorFacade

          public WriterInterceptorRegistry.WriterInterceptorFacade(MessageBodyWriterInterceptor interceptor)

  - ### Method Detail

    - #### getInterceptor

          public MessageBodyWriterInterceptor getInterceptor()

    - #### aroundWriteTo

          public void aroundWriteTo(WriterInterceptorContext writerInterceptorContext)
                             throws IOException,
                                    WebApplicationException

      Description copied from interface: `WriterInterceptor`
      Interceptor method wrapping calls to `MessageBodyWriter.writeTo(T, java.lang.Class<?>, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.Object>, java.io.OutputStream)` method. The parameters of the wrapped method called are available from `context`. Implementations of this method SHOULD explicitly call `WriterInterceptorContext.proceed()` to invoke the next interceptor in the chain, and ultimately the wrapped `MessageBodyWriter.writeTo` method.
      Specified by:
        `aroundWriteTo` in interface `WriterInterceptor`
      Parameters:
        `writerInterceptorContext` - invocation context.
      Throws:
        `IOException` - if an IO error arises or is thrown by the wrapped `MessageBodyWriter.writeTo` method.
        `WebApplicationException` - thrown by the wrapped `MessageBodyWriter.writeTo` method.

Copyright © 2014. All Rights Reserved.