本文整理汇总了Java中org.jboss.arquillian.container.spi.client.container.DeployableContainer类的典型用法代码示例。如果您正苦于以下问题:Java DeployableContainer类的具体用法?Java DeployableContainer怎么用?Java DeployableContainer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DeployableContainer类属于org.jboss.arquillian.container.spi.client.container包,在下文中一共展示了DeployableContainer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: register
import org.jboss.arquillian.container.spi.client.container.DeployableContainer; //导入依赖的package包/类
@Override
public void register(ExtensionBuilder builder) {
builder.override(
DeployableContainer.class, KarafRemoteDeployableContainer.class,
LiferayRemoteDeployableContainer.class);
builder.service(
AuxiliaryArchiveAppender.class,
LiferayEnricherAuxiliaryAppender.class);
builder.service(
AuxiliaryArchiveAppender.class,
LiferayWaitForServiceBuilderAuxiliaryAppender.class);
builder.observer(LiferayInstallDependenciesObserver.class);
builder.service(TestEnricher.class, PortalURLTestEnricher.class);
}
示例2: getDomainController
import org.jboss.arquillian.container.spi.client.container.DeployableContainer; //导入依赖的package包/类
private DomainManager getDomainController(final String containerQualifier, boolean requiresControllable) {
final ContainerRegistry registry = containerRegistry.get();
if (registry == null) {
throw new IllegalArgumentException("No container registry in context");
}
if (!containerExists(registry.getContainers(), containerQualifier)) {
throw new IllegalArgumentException("No container with the specified name exists");
}
if (requiresControllable && !isControllableContainer(registry.getContainers(), containerQualifier)) {
throw new IllegalArgumentException("Could not stop " + containerQualifier + " container. The container life cycle is controlled by Arquillian");
}
if (!isStarted(containerQualifier)) {
throw new IllegalArgumentException(String.format("Container %s has not been started.", containerQualifier));
}
final Container container = registry.getContainer(containerQualifier);
final DeployableContainer<?> deployableContainer = container.getDeployableContainer();
if (deployableContainer instanceof CommonDomainDeployableContainer) {
return CommonDomainDeployableContainer.class.cast(deployableContainer).getDomainManager();
}
throw new IllegalArgumentException(String.format("The container defined with %s is not a domain controller", containerQualifier));
}
示例3: register
import org.jboss.arquillian.container.spi.client.container.DeployableContainer; //导入依赖的package包/类
@Override
public void register(final ExtensionBuilder builder) {
if (ArquillianUtil.isCurrentAdapter(ADAPTER)) {
builder.service(DeployableContainer.class, EmbeddedTomEEContainer.class)
.observer(DeploymentExceptionObserver.class)
.observer(RemoteInitialContextObserver.class)
.observer(TestObserver.class)
.service(TestEnricher.class, TomEEInjectionEnricher.class)
.service(ResourceProvider.class, DeploymentExceptionProvider.class);
try {
builder.service(TransactionProvider.class,
(Class<? extends TransactionProvider>) Thread.currentThread().getContextClassLoader()
.loadClass("org.apache.openejb.arquillian.transaction.OpenEJBTransactionProvider"));
} catch (final Throwable t) {
// skip, not mandatory
}
}
}
示例4: register
import org.jboss.arquillian.container.spi.client.container.DeployableContainer; //导入依赖的package包/类
@Override
public void register(final ExtensionBuilder builder) {
if (ArquillianUtil.isCurrentAdapter(ADAPTER)) {
final ReentrantLock l = lock;
l.lock();
try {
if (!registered.getAndSet(true)) {
try {
builder.observer(RemoteInitialContextObserver.class);
builder.observer(DeploymentExceptionObserver.class);
builder.service(DeployableContainer.class, RemoteTomEEContainer.class)
.service(AuxiliaryArchiveAppender.class, RemoteTomEEEJBEnricherArchiveAppender.class)
.service(ResourceProvider.class, DeploymentExceptionProvider.class);
} catch (final IllegalArgumentException e) {
Logger.getLogger(RemoteTomEEExtension.class.getName()).log(Level.WARNING, "RemoteTomEEExtension: " + e.getMessage());
}
}
} finally {
l.unlock();
}
}
}
示例5: register
import org.jboss.arquillian.container.spi.client.container.DeployableContainer; //导入依赖的package包/类
@Override
public void register(ExtensionBuilder builder) {
builder.service(Protocol.class, DaemonProtocol.class)
.service(AuxiliaryArchiveAppender.class, WildFlySwarmDeploymentAppender.class)
.service(DeployableContainer.class, WildFlySwarmContainer.class)
.service(DeploymentScenarioGenerator.class, DefaultDeploymentScenarioGenerator.class)
.override(ResourceProvider.class, URLResourceProvider.class, SwarmURLResourceProvider.class)
.override(ResourceProvider.class, URIResourceProvider.class, SwarmURIResourceProvider.class)
.observer(WildFlySwarmObserver.class);
}
示例6: register
import org.jboss.arquillian.container.spi.client.container.DeployableContainer; //导入依赖的package包/类
@Override
public void register(ExtensionBuilder builder) {
builder.service(Protocol.class, DaemonProtocol.class)
.service(AuxiliaryArchiveAppender.class, WildFlySwarmDeploymentAppender.class)
.service(DeployableContainer.class, WildFlySwarmContainer.class)
.override(ResourceProvider.class, URLResourceProvider.class, SwarmURLResourceProvider.class)
.override(ResourceProvider.class, URIResourceProvider.class, SwarmURIResourceProvider.class)
.observer(WildFlySwarmObserver.class);
}
示例7: register
import org.jboss.arquillian.container.spi.client.container.DeployableContainer; //导入依赖的package包/类
@Override
public void register(ExtensionBuilder builder) {
builder.override(
DeployableContainer.class,
KarafWithoutBundleRemoteDeployableContainer.class,
LiferayRemoteDeployableContainer.class);
builder.service(
AuxiliaryArchiveAppender.class,
LiferayEnricherAuxiliaryAppender.class);
builder.service(
AuxiliaryArchiveAppender.class,
LiferayWaitForServiceAuxiliaryAppender.class);
}
开发者ID:arquillian,项目名称:arquillian-extension-liferay,代码行数:16,代码来源:LiferayRemoteContainerExtension.java
示例8: register
import org.jboss.arquillian.container.spi.client.container.DeployableContainer; //导入依赖的package包/类
@Override
public void register(ExtensionBuilder builder) {
builder.override(
DeployableContainer.class, KarafRemoteDeployableContainer.class,
KarafWithoutBundleRemoteDeployableContainer.class);
builder.override(
ApplicationArchiveProcessor.class,
OSGiApplicationArchiveProcessor.class,
NoOpArchiveApplicationProcessor.class);
}
示例9: TargetController
import org.jboss.arquillian.container.spi.client.container.DeployableContainer; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
public TargetController(ContainerAdapter adapter, Injector injector, File resolverCacheFolder) throws Exception {
// init
this.classloader = resolveClasspathDependencies(adapter, resolverCacheFolder);
final Class<?> delegateClass = classloader.loadClass(adapter.adapterClass());
this.delegate = injector.inject((DeployableContainer) delegateClass.newInstance());
this.adapter = adapter;
}
示例10: getContainerByDeployableContainer
import org.jboss.arquillian.container.spi.client.container.DeployableContainer; //导入依赖的package包/类
public static Container getContainerByDeployableContainer(ContainerRegistry registry, DeployableContainer<?> dc) {
for (Container container : registry.getContainers()) {
if (dc == container.getDeployableContainer()) {
return container;
}
}
return null;
}
示例11: doServiceDeploy
import org.jboss.arquillian.container.spi.client.container.DeployableContainer; //导入依赖的package包/类
public synchronized void doServiceDeploy(@Observes BeforeDeploy event, Container container, ServiceArchiveHolder archiveHolder) {
// already deployed?
if (serviceArchiveDeployed.contains(container.getName())) {
archiveHolder.deploymentExistsAndRemove(event.getDeployment().getName()); // cleanup
return;
}
// only deploy the service if the deployment has been enriched by the jmx-as7 protocol
if (archiveHolder.deploymentExistsAndRemove(event.getDeployment().getName())) {
JavaArchive serviceArchive = (JavaArchive) archiveHolder.getArchive();
try {
log.infof("Deploy arquillian service: %s", serviceArchive);
final Map<String, String> props = container.getContainerConfiguration().getContainerProperties();
//MASSIVE HACK
//write the management connection props to the archive, so we can access them from the server
final ByteArrayOutputStream bytes = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(bytes);
out.writeObject(props.get("managementPort"));
out.writeObject(NetworkUtils.formatPossibleIpv6Address(props.get("managementAddress")));
out.writeObject(NetworkUtils.formatPossibleIpv6Address(props.get("managementProtocol")));
out.writeObject(props.get("authenticationConfig"));
out.close();
serviceArchive.addAsManifestResource(new ByteArrayAsset(bytes.toByteArray()), "org.jboss.as.managementConnectionProps");
DeployableContainer<?> deployableContainer = container.getDeployableContainer();
deployableContainer.deploy(serviceArchive);
serviceArchiveDeployed.add(container.getName());
} catch (Throwable th) {
log.error("Cannot deploy arquillian service", th);
}
}
}
示例12: undeploy
import org.jboss.arquillian.container.spi.client.container.DeployableContainer; //导入依赖的package包/类
public synchronized void undeploy(@Observes BeforeStop event, Container container, ServiceArchiveHolder archiveHolder) {
// clean up if we deployed to this container?
if (serviceArchiveDeployed.contains(container.getName())) {
try {
Archive<?> serviceArchive = archiveHolder.getArchive();
log.infof("Undeploy arquillian service: %s", serviceArchive);
DeployableContainer<?> deployableContainer = container.getDeployableContainer();
deployableContainer.undeploy(serviceArchive);
serviceArchiveDeployed.remove(container.getName());
} catch (Throwable th) {
log.error("Cannot undeploy arquillian service", th);
}
}
}
示例13: register
import org.jboss.arquillian.container.spi.client.container.DeployableContainer; //导入依赖的package包/类
@Override
public void register(ExtensionBuilder builder)
{
builder.service(DeployableContainer.class, FurnaceDeployableContainer.class);
builder.service(DeploymentScenarioGenerator.class, FurnaceDeploymentScenarioGenerator.class);
builder.service(Protocol.class, FurnaceProtocol.class);
builder.service(AuxiliaryArchiveProcessor.class, FurnaceAuxiliaryArchiveProcessor.class);
}
示例14: findContainer
import org.jboss.arquillian.container.spi.client.container.DeployableContainer; //导入依赖的package包/类
private Container findContainer(ContainerRegistry registry, DeployableContainer<?> deployable) {
for (Container container : registry.getContainers()) {
if (container.getDeployableContainer() == deployable) {
return container;
}
}
return null;
}
示例15: register
import org.jboss.arquillian.container.spi.client.container.DeployableContainer; //导入依赖的package包/类
@Override
public void register(final ExtensionBuilder builder) {
if (ArquillianUtil.isCurrentAdapter(ADAPTER)) {
final ReentrantLock l = lock;
l.lock();
try {
if (!registered.getAndSet(true)) {
try {
builder.observer(DeploymentExceptionObserver.class);
builder.observer(RemoteInitialContextObserver.class);
builder.service(DeployableContainer.class, TomEEWebappContainer.class)
.service(AuxiliaryArchiveAppender.class, TomEEWebappEJBEnricherArchiveAppender.class)
.service(ResourceProvider.class, DeploymentExceptionProvider.class);
} catch (final IllegalArgumentException e) {
Logger.getLogger(TomEEWebappExtension.class.getName()).log(Level.WARNING, "TomEEWebappExtension: " + e.getMessage());
}
}
} finally {
l.unlock();
}
}
}