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


Java RegistryBuilder.build方法代码示例

本文整理汇总了Java中org.apache.tapestry5.ioc.RegistryBuilder.build方法的典型用法代码示例。如果您正苦于以下问题:Java RegistryBuilder.build方法的具体用法?Java RegistryBuilder.build怎么用?Java RegistryBuilder.build使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.tapestry5.ioc.RegistryBuilder的用法示例。


在下文中一共展示了RegistryBuilder.build方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setupRegistry

import org.apache.tapestry5.ioc.RegistryBuilder; //导入方法依赖的package包/类
public final void setupRegistry()
{
    RegistryBuilder builder = new RegistryBuilder();
    builder.add(TapestryModule.class);
    builder.add(JpaModule.class);
    builder.add(TransactionalUnitsModule.class);
    builder.add(JpaTestModule.class);
    builder.add(concreteJpaProviderTestModuleClass);

    registry = builder.build();
    // set PageTesterContext, otherwise T5 tries to load classpath assets
    ApplicationGlobals globals = registry.getObject(ApplicationGlobals.class, null);
    globals.storeContext(new PageTesterContext(""));
    registry.performRegistryStartup();

    entityManagerManager = registry.getService(EntityManagerManager.class);
    topLevelService = registry.getService(TopLevelService.class);
}
 
开发者ID:satago,项目名称:tapestry-jpa-transactions,代码行数:19,代码来源:JpaTest.java

示例2: contextInitialized

import org.apache.tapestry5.ioc.RegistryBuilder; //导入方法依赖的package包/类
@Override
public void contextInitialized(ServletContextEvent event) {
  RegistryBuilder builder = new RegistryBuilder();
  builder.add(TapestryModule.class);
  Registry registry = builder.build();
  registry.performRegistryStartup();
  final Server server = registry.getService(Server.class);

  HttpTransportServer httpTransportServer = new HttpTransportServer().ontransport(server);
  WebSocketTransportServer wsTransportServer = new WebSocketTransportServer().ontransport(server);

  // Installs the server on Atmosphere platform
  ServletContext context = event.getServletContext();
  Servlet servlet = new AsityAtmosphereServlet().onhttp(httpTransportServer).onwebsocket
    (wsTransportServer);
  ServletRegistration.Dynamic reg = context.addServlet(AsityAtmosphereServlet.class.getName(),
    servlet);
  reg.setAsyncSupported(true);
  reg.setInitParameter(ApplicationConfig.DISABLE_ATMOSPHEREINTERCEPTOR, Boolean.TRUE.toString());
  reg.addMapping("/cettia");
}
 
开发者ID:cettia,项目名称:cettia-examples,代码行数:22,代码来源:Bootstrap.java

示例3: contextInitialized

import org.apache.tapestry5.ioc.RegistryBuilder; //导入方法依赖的package包/类
@Override
public void contextInitialized(ServletContextEvent event) {
    RegistryBuilder builder = new RegistryBuilder();
    builder.add(TapestryModule.class);
    Registry registry = builder.build();
    registry.performRegistryStartup();        
    final Server server = registry.getService(Server.class);
    
    HttpTransportServer httpTransportServer = new HttpTransportServer().transportAction(server);
    WebSocketTransportServer wsTransportServer = new WebSocketTransportServer().transportAction(server);
    
    // Installs the server on Atmosphere platform
    ServletContext context = event.getServletContext();
    Servlet servlet = new VibeAtmosphereServlet().httpAction(httpTransportServer).wsAction(wsTransportServer);
    ServletRegistration.Dynamic reg = context.addServlet(VibeAtmosphereServlet.class.getName(), servlet);
    reg.setAsyncSupported(true);
    reg.setInitParameter(ApplicationConfig.DISABLE_ATMOSPHEREINTERCEPTOR, Boolean.TRUE.toString());
    reg.addMapping("/vibe");
}
 
开发者ID:vibe-project,项目名称:vibe-examples,代码行数:20,代码来源:Bootstrap.java

示例4: setupOctaveEngine

import org.apache.tapestry5.ioc.RegistryBuilder; //导入方法依赖的package包/类
@BeforeClass
public static void setupOctaveEngine() {
	RegistryBuilder builder = new RegistryBuilder();
	IOCUtilities.addDefaultModules(builder);
	builder.add(IterModule.class);
	registry = builder.build();
	registry.performRegistryStartup();

	// Additional user provided informations
	// How many states do we have
	System.getProperties().put(IterSymbolsNames.PROBLEM_SIZE, "6");
	System.getProperties().put(IterSymbolsNames.LB, "0.0, 0.0, 0.0");
	System.getProperties().put(IterSymbolsNames.UB, "20.0,20.0,20.0");
	System.getProperties().put("at.ac.tuwien.dsg.cloud.configuration",
			"./conf/cloud.properties");

}
 
开发者ID:alessiogambi,项目名称:iter,代码行数:18,代码来源:InferMarkovModelTest.java

示例5: setupOctaveEngine

import org.apache.tapestry5.ioc.RegistryBuilder; //导入方法依赖的package包/类
@BeforeClass
public static void setupOctaveEngine() {
	RegistryBuilder builder = new RegistryBuilder();
	// IOCUtilities.addDefaultModules(builder);
	builder.add(IterModule.class);
	registry = builder.build();
	registry.performRegistryStartup();
	//

	typeCoercer = registry.getService(TypeCoercer.class);
	traceGeneratorWebService = registry.getService(SymbolSource.class)
			.valueForSymbol(IterSymbolsNames.TRACEGENERATOR_URL);

	loadGenerator = new SinusLoadGenerator(
			LoggerFactory.getLogger(LoadGenerator.class),
			"SinusLoadGenerator", typeCoercer, traceGeneratorWebService,
			testFile, manifestFile, 0.0, 30.0, 0.0, 0.01, //
			100, // nBins
			registry.getService("RandomSinusLoadGenerator",
					InputSampler.class), 300);
	dataCollectionService = registry
			.getService(DataCollectionService.class);

	mathEngineDao = registry.getService("matlab", MathEngineDao.class);
}
 
开发者ID:alessiogambi,项目名称:iter,代码行数:26,代码来源:BasicRunnerTest.java

示例6: setup

import org.apache.tapestry5.ioc.RegistryBuilder; //导入方法依赖的package包/类
@Before
public void setup() {
	// TODO Auto-generated constructor stub
	RegistryBuilder builder = new RegistryBuilder();
	// Load all the modules in the cp
	IOCUtilities.addDefaultModules(builder);
	// Load all the local modules
	builder.add(CLIModule.class);
	// Add the test module
	// Add the Complex test modul e
	builder.add(ComplexConstraintModule.class);
	// builder.add(TestModule.class);

	// Build the registry
	registry = builder.build();
	registry.performRegistryStartup();
}
 
开发者ID:alessiogambi,项目名称:tapestry5-cli,代码行数:18,代码来源:CLIParserTest.java

示例7: setup

import org.apache.tapestry5.ioc.RegistryBuilder; //导入方法依赖的package包/类
/**
 * Create a basic registry that knows how to create the connection pools
 * defined in the local src/main/resources/database.properties file.
 */
public static void setup() {

	RegistryBuilder builder = new RegistryBuilder();
	builder.add(DTOGenerationModule.class);
	registry = builder.build();
	registry.performRegistryStartup();
	mainDB = registry.getService(DBConnectionPoolService.class, MainDB.class);

	// For Walker, the secondary database is not needed, yet.
	// secondaryDB = registry.getService(DBConnectionPoolService.class,
	// SecondaryDB.class);
}
 
开发者ID:Sotera,项目名称:graphene-walker,代码行数:17,代码来源:DTOGeneration.java

示例8: setup

import org.apache.tapestry5.ioc.RegistryBuilder; //导入方法依赖的package包/类
public static void setup() {

		RegistryBuilder builder = new RegistryBuilder();
		builder.add(DTOGenerationModule.class);
		registry = builder.build();
		registry.performRegistryStartup();
		mainDB = registry.getService(DBConnectionPoolService.class,
				MainDB.class);

	}
 
开发者ID:Sotera,项目名称:graphene-walker,代码行数:11,代码来源:WalkerIntrospector.java

示例9: setup

import org.apache.tapestry5.ioc.RegistryBuilder; //导入方法依赖的package包/类
@BeforeClass
public static void setup() {
	System.getProperties().put("at.ac.tuwien.dsg.cloud.configuration",
			"./conf/cloud.properties");
	RegistryBuilder builder = new RegistryBuilder();
	IOCUtilities.addDefaultModules(builder);
	builder.add(IterModule.class);
	registry = builder.build();
	registry.performRegistryStartup();
}
 
开发者ID:alessiogambi,项目名称:iter,代码行数:11,代码来源:TriangleLoadGeneratorTest.java

示例10: setup

import org.apache.tapestry5.ioc.RegistryBuilder; //导入方法依赖的package包/类
@Before
public void setup() {
	RegistryBuilder builder = new RegistryBuilder();
	// NO ! Load all the modules in the cp
	// IOCUtilities.addDefaultModules(builder);
	// Load all the local modules
	builder.add(IterModule.class);
	registry = builder.build();
	registry.performRegistryStartup();
}
 
开发者ID:alessiogambi,项目名称:iter,代码行数:11,代码来源:CLITest.java

示例11: main

import org.apache.tapestry5.ioc.RegistryBuilder; //导入方法依赖的package包/类
public static void main(String[] args) {
	RegistryBuilder builder = new RegistryBuilder();
	IOCUtilities.addDefaultModules(builder);
	builder.add(IterModule.class);
	Registry registry = builder.build();

	TypeCoercer typeCoercer = registry.getService(TypeCoercer.class);
	double[] convertToNumberArray = new double[] { 1.0, 2.0, 3.0 };
	Number[] numbers = typeCoercer.coerce(convertToNumberArray,
			Number[].class);

	double[] doubles = typeCoercer.coerce(numbers, double[].class);
}
 
开发者ID:alessiogambi,项目名称:iter,代码行数:14,代码来源:CoercionTest.java

示例12: setup

import org.apache.tapestry5.ioc.RegistryBuilder; //导入方法依赖的package包/类
@Before
public void setup() {

	// SETUP THE ENVIRONMENT: NOTE THAT THIS IS REALLY ANNOYNG !
	// NOTE THAT THIS SHOULD BE PASSED VIA COMMAND LINE TOO
	System.getProperties().put(
			IterSymbolsNames.INPUT_FILE,
			(new File("src/test/resources/bootstrap.xml"))
					.getAbsolutePath());

	// Options are specified via the cloud.properties file:
	System.getProperties().put(
			CloudSymbolConstants.CONFIGURATION_FILE,
			(new File("src/test/resources/cloud.properties"))
					.getAbsolutePath());

	RegistryBuilder builder = new RegistryBuilder();
	IOCUtilities.addDefaultModules(builder);
	// Collection<Class> exclusionFilter = new ArrayList<Class>();
	// exclusionFilter.add(BeanValidatorModule.class);
	// ExtendedIOCUtilities.addDefaultModulesWithExclusion(builder,
	// exclusionFilter);
	builder.add(IterModule.class);

	// Add the testAssertion contributions
	builder.add(TestAssertions.class);

	registry = builder.build();
	registry.performRegistryStartup();
}
 
开发者ID:alessiogambi,项目名称:iter,代码行数:31,代码来源:BootstrapingTest.java

示例13: setupOctaveEngine

import org.apache.tapestry5.ioc.RegistryBuilder; //导入方法依赖的package包/类
@BeforeClass
public static void setupOctaveEngine() {
	RegistryBuilder builder = new RegistryBuilder();
	// IOCUtilities.addDefaultModules(builder);
	builder.add(IterModule.class);
	registry = builder.build();
}
 
开发者ID:alessiogambi,项目名称:iter,代码行数:8,代码来源:AddTestExecutionTest.java

示例14: setup

import org.apache.tapestry5.ioc.RegistryBuilder; //导入方法依赖的package包/类
@Before
public void setup() {
	// TODO Auto-generated constructor stub
	builder = new RegistryBuilder();
	// Load all the modules in the cp
	IOCUtilities.addDefaultModules(builder);

	// Load all the local modules
	builder.add(CLIModule.class);
	// Add the Complex test module
	builder.add(ComplexConstraintModule.class);

	registry = builder.build();
	registry.performRegistryStartup();
}
 
开发者ID:alessiogambi,项目名称:tapestry5-cli,代码行数:16,代码来源:ComplexConstraintValidatorTest.java

示例15: setup

import org.apache.tapestry5.ioc.RegistryBuilder; //导入方法依赖的package包/类
@Before
public void setup() {
	// TODO Auto-generated constructor stub
	builder = new RegistryBuilder();
	// Load all the modules in the cp
	IOCUtilities.addDefaultModules(builder);

	// Load all the local modules
	builder.add(CLIModule.class);
	// Add the test module
	builder.add(TestModule.class);

	registry = builder.build();
	registry.performRegistryStartup();
}
 
开发者ID:alessiogambi,项目名称:tapestry5-cli,代码行数:16,代码来源:BasicJSR303ValidatorTest.java


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