当前位置: 首页>>代码示例>>Java>>正文


Java ObjectifyFilter类代码示例

本文整理汇总了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.
  }
}
 
开发者ID:google,项目名称:nomulus,代码行数:19,代码来源:AppEngineRule.java

示例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));
}
 
开发者ID:ipeirotis,项目名称:mturk-surveys,代码行数:17,代码来源:MturkEndpointsModule.java

示例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);
	
	
}
 
开发者ID:omerio,项目名称:appstart,代码行数:22,代码来源:AppServletModule.java

示例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;
}
 
开发者ID:nhuttrung,项目名称:spring-data-objectify,代码行数:10,代码来源:ExampleApp.java

示例5: after

import com.googlecode.objectify.ObjectifyFilter; //导入依赖的package包/类
@After
public void after() {
  ObjectifyFilter.complete();
  ObjectifyService.setFactory(factory);
  ObjectifyFilter.complete();
  helper.tearDown();
}
 
开发者ID:google,项目名称:nomulus,代码行数:8,代码来源:OfyFilterTest.java

示例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);
                    }
                });
    }
 
开发者ID:eboukamza,项目名称:jersey-guice-ofy-hello-world,代码行数:16,代码来源:MyGuiceServletContextListener.java

示例7: objectifyFilter

import com.googlecode.objectify.ObjectifyFilter; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean
public ObjectifyFilter objectifyFilter() {
    return new ObjectifyFilter();
}
 
开发者ID:monPlan,项目名称:springboot-spwa-gae-demo,代码行数:6,代码来源:GaeToolsAutoConfiguration.java

示例8: objectifyFilter

import com.googlecode.objectify.ObjectifyFilter; //导入依赖的package包/类
/**
 * @return Register the {@link ObjectifyFilter}.
 */
@Bean
@ConditionalOnMissingBean
public ObjectifyFilter objectifyFilter() {
    return new ObjectifyFilter();
}
 
开发者ID:n15g,项目名称:spring-boot-gae,代码行数:9,代码来源:ObjectifyAutoConfiguration.java

示例9: configureServlets

import com.googlecode.objectify.ObjectifyFilter; //导入依赖的package包/类
@Override
protected void configureServlets() {
    super.configureServlets();
    bind(ObjectifyFilter.class).in(Singleton.class);
    filter("/*").through(ObjectifyFilter.class);
}
 
开发者ID:mikea,项目名称:appengine-java-tools,代码行数:7,代码来源:ObjectifyModule.java

示例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);
}
 
开发者ID:eboukamza,项目名称:jersey-guice-ofy-hello-world,代码行数:6,代码来源:GuiceModule.java

示例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);
		
	
}
 
开发者ID:omerio,项目名称:appstart,代码行数:13,代码来源:AppServletModule.java

示例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);
	
}
 
开发者ID:omerio,项目名称:appstart,代码行数:8,代码来源:BusinessLogicModule.java


注:本文中的com.googlecode.objectify.ObjectifyFilter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。