本文整理汇总了Java中com.googlecode.objectify.ObjectifyFilter类的典型用法代码示例。如果您正苦于以下问题:Java ObjectifyFilter类的具体用法?Java ObjectifyFilter怎么用?Java ObjectifyFilter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ObjectifyFilter类属于com.googlecode.objectify包,在下文中一共展示了ObjectifyFilter类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: after
import com.googlecode.objectify.ObjectifyFilter; //导入依赖的package包/类
@Override
protected void after() {
// Resets Objectify. Although it would seem more obvious to do this at the start of a request
// instead of at the end, this is more consistent with what ObjectifyFilter does in real code.
ObjectifyFilter.complete();
helper.tearDown();
helper = null;
// Test that Datastore didn't need any indexes we don't have listed in our index file.
try {
Set<String> autoIndexes = getIndexXmlStrings(Files.asCharSource(
new File(temporaryFolder.getRoot(), "datastore-indexes-auto.xml"), UTF_8).read());
Set<String> missingIndexes = Sets.difference(autoIndexes, MANUAL_INDEXES);
if (!missingIndexes.isEmpty()) {
assert_().fail("Missing indexes:\n%s", Joiner.on('\n').join(missingIndexes));
}
} catch (IOException e) { // This is fine; no indexes were written.
}
}
示例2: configureServlets
import com.googlecode.objectify.ObjectifyFilter; //导入依赖的package包/类
@Override
protected void configureServlets() {
super.configureServlets();
bind(ObjectifyFilter.class).in(Singleton.class);
filter("/*").through(ObjectifyFilter.class);
serve("/saveAnswer").with(SaveUserAnswerServlet.class);
serve("/getAnswer").with(GetUserAnswerServlet.class);
serve("/tasks/createHIT").with(CreateHITServlet.class);
serve("/tasks/disposeHITs").with(DisposeHITsServlet.class);
serve("/tasks/approveAssignments").with(ApproveAssignmentsServlet.class);
serve("/tasks/mergeAnswers").with(MergeAnswersServlet.class);
serve("/tasks/addHitCreationTime").with(AddHitCreationDateToUserAnswerServlet.class);
configureEndpoints("/_ah/api/*", ImmutableList.of(MturkEndpoint.class, SurveyEndpoint.class));
}
示例3: configureServlets
import com.googlecode.objectify.ObjectifyFilter; //导入依赖的package包/类
@Override
protected void configureServlets() {
// filters
// Objectify filter
filter("/*").through(ObjectifyFilter.class);
// servlets
serve("/home").with(HomeServlet.class);
// Jersey restful servlet
HashMap<String, String> params = new HashMap<String, String>();
params.put(PackagesResourceConfig.PROPERTY_PACKAGES, "uk.co.inetria.appstart.frontend.rest");
params.put(JSONConfiguration.FEATURE_POJO_MAPPING, "true");
// speed up jersey startup under appengine
params.put(ResourceConfig.FEATURE_DISABLE_WADL, "true");
serve("/api/*").with(GuiceContainer.class, params);
}
示例4: objectifyFilter
import com.googlecode.objectify.ObjectifyFilter; //导入依赖的package包/类
@Bean
public FilterRegistrationBean objectifyFilter(){
FilterRegistrationBean registration = new FilterRegistrationBean();
registration.setFilter(new ObjectifyFilter());
registration.addUrlPatterns("/*");
registration.setOrder(1);
return registration;
}
示例5: after
import com.googlecode.objectify.ObjectifyFilter; //导入依赖的package包/类
@After
public void after() {
ObjectifyFilter.complete();
ObjectifyService.setFactory(factory);
ObjectifyFilter.complete();
helper.tearDown();
}
示例6: getInjector
import com.googlecode.objectify.ObjectifyFilter; //导入依赖的package包/类
protected Injector getInjector() {
final Map<String, String> params = Maps.newHashMap();
params.put(JAXRS_APPLICATION_CLASS, MyApplication.class.getCanonicalName());
return Guice.createInjector(
new GuiceModule(),
new ServletModule() {
@Override
protected void configureServlets() {
filter("/api/*").through(ObjectifyFilter.class);
serve("/api/*").with(GuiceContainer.class, params);
}
});
}
示例7: objectifyFilter
import com.googlecode.objectify.ObjectifyFilter; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean
public ObjectifyFilter objectifyFilter() {
return new ObjectifyFilter();
}
示例8: objectifyFilter
import com.googlecode.objectify.ObjectifyFilter; //导入依赖的package包/类
/**
* @return Register the {@link ObjectifyFilter}.
*/
@Bean
@ConditionalOnMissingBean
public ObjectifyFilter objectifyFilter() {
return new ObjectifyFilter();
}
示例9: configureServlets
import com.googlecode.objectify.ObjectifyFilter; //导入依赖的package包/类
@Override
protected void configureServlets() {
super.configureServlets();
bind(ObjectifyFilter.class).in(Singleton.class);
filter("/*").through(ObjectifyFilter.class);
}
示例10: configure
import com.googlecode.objectify.ObjectifyFilter; //导入依赖的package包/类
@Override
public void configure() {
bind(ObjectifyFilter.class).in(Singleton.class);
bind(HelloDao.class).to(HelloDaoImpl.class).in(RequestScoped.class);
}
示例11: configureServlets
import com.googlecode.objectify.ObjectifyFilter; //导入依赖的package包/类
@Override
protected void configureServlets() {
// filters
// Objectify filter
filter("/*").through(ObjectifyFilter.class);
// servlets
serve("/backend/process").with(BackendServlet.class);
}
示例12: configure
import com.googlecode.objectify.ObjectifyFilter; //导入依赖的package包/类
@Override
protected void configure() {
bind(ObjectifyFilter.class).in(Singleton.class);
bind(TodoService.class).to(TodoServiceImpl.class).in(Scopes.SINGLETON);
}