org.glassfish.jersey.server.internal
Class JsonWithPaddingInterceptor

java.lang.Object
  extended by org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor
All Implemented Interfaces:
WriterInterceptor

public class JsonWithPaddingInterceptor
extends Object
implements 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 (michal.gajdos at oracle.com)
See Also:
JSONP

Constructor Summary
JsonWithPaddingInterceptor(javax.inject.Provider<ContainerRequest> containerRequestProvider)
           
 
Method Summary
 void aroundWriteTo(WriterInterceptorContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonWithPaddingInterceptor

@Inject
public JsonWithPaddingInterceptor(javax.inject.Provider<ContainerRequest> containerRequestProvider)
Method Detail

aroundWriteTo

public void aroundWriteTo(WriterInterceptorContext context)
                   throws IOException,
                          WebApplicationException
Specified by:
aroundWriteTo in interface WriterInterceptor
Throws:
IOException
WebApplicationException


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.