本文整理匯總了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)
{
}