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


Java Container类代码示例

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

示例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
    }
}
 
开发者ID:orbit,项目名称:orbit-hk2,代码行数:23,代码来源:HK2Addon.java

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

示例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();
}
 
开发者ID:orbit,项目名称:orbit-rest-client,代码行数:10,代码来源:RestClientTest.java

示例5: HK2LifetimeExtension

import cloud.orbit.container.Container; //导入依赖的package包/类
public HK2LifetimeExtension(Container container)
{
    this.container = container;
}
 
开发者ID:orbit,项目名称:orbit-hk2,代码行数:5,代码来源:HK2LifetimeExtension.java

示例6: setContainer

import cloud.orbit.container.Container; //导入依赖的package包/类
public void setContainer(Container container)
{
    this.container = container;
}
 
开发者ID:orbit,项目名称:orbit-hk2,代码行数:5,代码来源:HK2LifetimeExtension.java

示例7: getInjectTest

import cloud.orbit.container.Container; //导入依赖的package包/类
public Container getInjectTest()
{
    return injectTest;
}
 
开发者ID:orbit,项目名称:orbit-hk2,代码行数:5,代码来源:SingletonClass.java

示例8: main

import cloud.orbit.container.Container; //导入依赖的package包/类
public static void main(String[] args) throws ExecutionException, InterruptedException
{
    final Container container = new Container();
    container.start();
}
 
开发者ID:orbit,项目名称:orbit-samples,代码行数:6,代码来源:WebMain.java

示例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();
}
 
开发者ID:orbit,项目名称:orbit-samples,代码行数:6,代码来源:ServerMain.java

示例10: configure

import cloud.orbit.container.Container; //导入依赖的package包/类
public default void configure(final Container container)
{

}
 
开发者ID:orbit,项目名称:orbit-hk2,代码行数:5,代码来源:Addon.java

示例11: postInject

import cloud.orbit.container.Container; //导入依赖的package包/类
public default void postInject(final Container container)
{

}
 
开发者ID:orbit,项目名称:orbit-hk2,代码行数:5,代码来源:Addon.java


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