Class JsonWithPaddingInterceptor
- java.lang.Object
-
- org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor
-
- All Implemented Interfaces:
WriterInterceptor
@Priority(4100) public class JsonWithPaddingInterceptor extends Object implements WriterInterceptor
AWriterInterceptorimplementation for JSONP format. This interceptor wraps a JSON stream obtained by a underlying JSON provider into a callback function that can be defined by theJSONPannotation.- Author:
- Michal Gajdos
- See Also:
JSONP
-
-
Constructor Summary
Constructors Constructor Description JsonWithPaddingInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaroundWriteTo(WriterInterceptorContext context)
-
-
-
Method Detail
-
aroundWriteTo
public void aroundWriteTo(WriterInterceptorContext context) throws IOException, WebApplicationException
Description copied from interface:WriterInterceptorInterceptor method wrapping calls toMessageBodyWriter.writeTo(T, java.lang.Class<?>, java.lang.reflect.Type, java.lang.annotation.Annotation[], jakarta.ws.rs.core.MediaType, jakarta.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.Object>, java.io.OutputStream)method. The parameters of the wrapped method called are available fromcontext. Implementations of this method SHOULD explicitly callWriterInterceptorContext.proceed()to invoke the next interceptor in the chain, and ultimately the wrappedMessageBodyWriter.writeTomethod.- Specified by:
aroundWriteToin interfaceWriterInterceptor- Parameters:
context- invocation context.- Throws:
IOException- if an IO error arises or is thrown by the wrappedMessageBodyWriter.writeTomethod.WebApplicationException- thrown by the wrappedMessageBodyWriter.writeTomethod.
-
-