當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。