本文整理了Java中org.apache.polygene.api.structure.Application.mode()
方法的一些代码示例,展示了Application.mode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Application.mode()
方法的具体详情如下:
包路径:org.apache.polygene.api.structure.Application
类名称:Application
方法名:mode
暂无
代码示例来源:origin: apache/attic-polygene-java
@Override
protected String hostnames()
{
switch( application.mode() )
{
case development:
return "localhost:9042";
case staging:
return "cassandra.staging:9042";
case production:
return "cassandra1.prod:9042,cassandra2.prod:9042,cassandra3.prod:9042";
case test:
default:
return "cassandra.test:9042";
}
}
}
代码示例来源:origin: org.apache.polygene.libraries/org.apache.polygene.library.fileconfig
if ( !app.mode().equals( Application.Mode.production ) ) {
application += "-" + app.mode().name();
代码示例来源:origin: apache/attic-polygene-java
if ( !app.mode().equals( Application.Mode.production ) ) {
application += "-" + app.mode().name();
代码示例来源:origin: apache/attic-polygene-java
@Test
public void testApplicationModeNotSet()
{
// mode is set to test in AbstractPolygeneTest
Assert.assertThat( "mode set to default",
application.mode(),
CoreMatchers.equalTo( Application.Mode.test ) );
}
代码示例来源:origin: apache/attic-polygene-java
@Test
public void testApplicationTestModeSet()
throws ActivationException, AssemblyException
{
Application.Mode mode = new SingletonAssembler()
{
public void assemble( ModuleAssembly module )
throws AssemblyException
{
module.layer().application().setMode( Application.Mode.test );
}
}.application().mode();
Assert.assertThat( "mode set to given value", mode, CoreMatchers.equalTo( Application.Mode.test ) );
}
代码示例来源:origin: apache/attic-polygene-java
@Test
public void testApplicationStagingModeSet()
throws ActivationException, AssemblyException
{
Application.Mode mode = new SingletonAssembler()
{
public void assemble( ModuleAssembly module )
throws AssemblyException
{
module.layer().application().setMode( Application.Mode.staging );
}
}.application().mode();
Assert.assertThat( "mode set to given value", mode, CoreMatchers.equalTo( Application.Mode.staging ) );
}
代码示例来源:origin: apache/attic-polygene-java
@Test
public void testApplicationDevelopmentModeSet()
throws ActivationException, AssemblyException
{
Application.Mode mode = new SingletonAssembler()
{
public void assemble( ModuleAssembly module )
throws AssemblyException
{
module.layer().application().setMode( Application.Mode.development );
}
}.application().mode();
Assert.assertThat( "mode set to given value", mode, CoreMatchers.equalTo( Application.Mode.development ) );
}
代码示例来源:origin: apache/attic-polygene-java
@Test
public void testApplicationProductionModeSet()
throws ActivationException, AssemblyException
{
Application.Mode mode = new SingletonAssembler()
{
public void assemble( ModuleAssembly module )
throws AssemblyException
{
module.layer().application().setMode( Application.Mode.production );
}
}.application().mode();
Assert.assertThat( "mode set to given value", mode, CoreMatchers.equalTo( Application.Mode.production ) );
}
}
代码示例来源:origin: apache/attic-polygene-java
Engine.getInstance().getRegisteredConverters().add( new PolygeneConverter( objectFactory ) );
if( polygeneApplication.mode() == Application.Mode.development )
内容来源于网络,如有侵权,请联系作者删除!