Class JsonWithPaddingInterceptor

  • All Implemented Interfaces:
    jakarta.ws.rs.ext.WriterInterceptor

    @Priority(4100)
    public class JsonWithPaddingInterceptor
    extends Object
    implements jakarta.ws.rs.ext.WriterInterceptor
    A WriterInterceptor implementation for JSONP format. This interceptor wraps a JSON stream obtained by a underlying JSON provider into a callback function that can be defined by the JSONP annotation.
    Author:
    Michal Gajdos
    See Also:
    JSONP
    • Constructor Detail

      • JsonWithPaddingInterceptor

        public JsonWithPaddingInterceptor()
    • Method Detail

      • aroundWriteTo

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