本文整理汇总了Java中cloud.orbit.container.Container类的典型用法代码示例。如果您正苦于以下问题:Java Container类的具体用法?Java Container怎么用?Java Container使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Container类属于cloud.orbit.container包,在下文中一共展示了Container类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configure
import cloud.orbit.container.Container; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public void configure(final Container container)
{
try
{
// We want to instrument if needed
final Class asyncClass = Class.forName(ASYNC_CLASS);
final Method initMethod = asyncClass.getMethod(ASYNC_INIT_METHOD);
initMethod.invoke(null);
}
catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException | InvocationTargetException e)
{
// Eat it
}
}
示例2: postInject
import cloud.orbit.container.Container; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public void postInject(final Container container)
{
try
{
// Stage is special, we want it to start and to register ourselves if it exists
final Class stageClass = Class.forName(STAGE_CLASS);
final Class extensionClass = Class.forName(EXTENSION_CLASS);
final Object stage = container.get(stageClass);
if(stage != null)
{
final Method addExtensionMethod = stageClass.getMethod(ADD_EXTENSION_METHOD, extensionClass);
addExtensionMethod.invoke(stage, new HK2LifetimeExtension(container));
}
}
catch(ClassNotFoundException | NoSuchMethodException | IllegalAccessException | InvocationTargetException e)
{
// Eat it
}
}
示例3: setupContainer
import cloud.orbit.container.Container; //导入依赖的package包/类
@Before
public void setupContainer()
{
container = new Container();
container.addPackageToScan("cloud.orbit.actors.extensions.hk2.test");
container.start().join();
}
示例4: beforeClass
import cloud.orbit.container.Container; //导入依赖的package包/类
@BeforeClass
public static void beforeClass()
{
container = new Container();
container.addClassToScan(HelloImpl.class);
container.start().join();
final EmbeddedJettyServer embeddedHttpServer = container.get(EmbeddedJettyServer.class);
host = "http://localhost:" + embeddedHttpServer.getPort();
}
示例5: HK2LifetimeExtension
import cloud.orbit.container.Container; //导入依赖的package包/类
public HK2LifetimeExtension(Container container)
{
this.container = container;
}
示例6: setContainer
import cloud.orbit.container.Container; //导入依赖的package包/类
public void setContainer(Container container)
{
this.container = container;
}
示例7: getInjectTest
import cloud.orbit.container.Container; //导入依赖的package包/类
public Container getInjectTest()
{
return injectTest;
}
示例8: main
import cloud.orbit.container.Container; //导入依赖的package包/类
public static void main(String[] args) throws ExecutionException, InterruptedException
{
final Container container = new Container();
container.start();
}
示例9: main
import cloud.orbit.container.Container; //导入依赖的package包/类
public static void main(String[] args) throws ExecutionException, InterruptedException
{
final Container container = new Container();
container.start().join();
}
示例10: configure
import cloud.orbit.container.Container; //导入依赖的package包/类
public default void configure(final Container container)
{
}
示例11: postInject
import cloud.orbit.container.Container; //导入依赖的package包/类
public default void postInject(final Container container)
{
}