Package com.googlecode.objectify
Class ObjectifyFilter
- java.lang.Object
-
- com.googlecode.objectify.util.AbstractFilter
-
- com.googlecode.objectify.ObjectifyFilter
-
- All Implemented Interfaces:
javax.servlet.Filter
public class ObjectifyFilter extends AbstractFilter
Configure this filter to use Objectify in your application. It works in concert withObjectifyServiceto provide the correctObjectifyinstance whenObjectifyService.ofy()is called. In your web.xml:<filter> <filter-name>ObjectifyFilter</filter-name> <filter-class>com.googlecode.objectify.ObjectifyFilter</filter-class> </filter> <filter-mapping> <filter-name>ObjectifyFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>Or, if you use Guice:filter("/*").through(ObjectifyFilter.class);If you use the Objectify outside of the context of a request (say, using the remote API or from a unit test), then you should use the ObjectifyService.run() method.
- Author:
- Jeff Schnitzer
-
-
Constructor Summary
Constructors Constructor Description ObjectifyFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)-
Methods inherited from class com.googlecode.objectify.util.AbstractFilter
destroy, init
-
-
-
-
Method Detail
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException- Throws:
IOExceptionjavax.servlet.ServletException
-
-