本文整理汇总了Java中org.jboss.shrinkwrap.descriptor.api.Descriptor类的典型用法代码示例。如果您正苦于以下问题:Java Descriptor类的具体用法?Java Descriptor怎么用?Java Descriptor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Descriptor类属于org.jboss.shrinkwrap.descriptor.api包,在下文中一共展示了Descriptor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: undeploy
import org.jboss.shrinkwrap.descriptor.api.Descriptor; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
public void undeploy(Descriptor descriptor) throws Throwable
{
if (descriptor == null)
throw new IllegalArgumentException("Descriptor is null");
if (descriptor.getDescriptorName() == null)
throw new IllegalArgumentException("Descriptor name is null");
if (!(descriptor instanceof InputStreamDescriptor ||
descriptor instanceof org.ironjacamar.embedded.dsl.datasources20.api.DatasourcesDescriptor ||
descriptor instanceof org.ironjacamar.embedded.dsl.resourceadapters20.api.ResourceAdaptersDescriptor))
throw new IllegalArgumentException("Unsupported descriptor: " + descriptor.getClass().getName());
if (!started)
throw new IllegalStateException("Container not started");
File parentDirectory = new File(SecurityActions.getSystemProperty("java.io.tmpdir"));
File descriptorFile = new File(parentDirectory, descriptor.getDescriptorName());
log.debugf("Undeploying: %s", descriptorFile);
kernel.getMainDeployer().undeploy(descriptorFile.toURI().toURL());
recursiveDelete(descriptorFile);
}
示例2: deploy
import org.jboss.shrinkwrap.descriptor.api.Descriptor; //导入依赖的package包/类
public void deploy(final Descriptor descriptor) throws DeploymentException {
deployment(new Callable<Void>() {
@Override
public Void call() throws Exception {
delegate.deploy(descriptor);
return null;
}
});
}
示例3: undeploy
import org.jboss.shrinkwrap.descriptor.api.Descriptor; //导入依赖的package包/类
public void undeploy(final Descriptor descriptor) throws DeploymentException {
deployment(new Callable<Void>() {
@Override
public Void call() throws Exception {
delegate.undeploy(descriptor);
return null;
}
});
}
示例4: validate
import org.jboss.shrinkwrap.descriptor.api.Descriptor; //导入依赖的package包/类
private void validate(Method deploymentMethod)
{
if (!Modifier.isStatic(deploymentMethod.getModifiers()))
{
throw new IllegalArgumentException("Method annotated with " + Deployment.class.getName() + " is not static. "
+ deploymentMethod);
}
if (!Archive.class.isAssignableFrom(deploymentMethod.getReturnType())
&& !Descriptor.class.isAssignableFrom(deploymentMethod.getReturnType()))
{
throw new IllegalArgumentException(
"Method annotated with " + Deployment.class.getName() +
" must have return type " + Archive.class.getName() + " or " + Descriptor.class.getName()
+ ". " + deploymentMethod);
}
if (deploymentMethod.getParameterTypes().length != 0)
{
throw new IllegalArgumentException("Method annotated with " + Deployment.class.getName()
+ " can not accept parameters. " + deploymentMethod);
}
String name = deploymentMethod.getAnnotation(Deployment.class).name();
try
{
if (!Strings.isNullOrEmpty(name) && !"_DEFAULT_".equals(name))
AddonId.fromCoordinates(name);
}
catch (IllegalArgumentException e)
{
throw new IllegalArgumentException("@" + Deployment.class.getName()
+ " requires name in the format \"name,version\", but was \"" + name + "\". ");
}
}
示例5: deploy
import org.jboss.shrinkwrap.descriptor.api.Descriptor; //导入依赖的package包/类
/**
* @throws UnsupportedOperationException
* @see org.jboss.arquillian.container.spi.client.container.DeployableContainer#deploy(org.jboss.shrinkwrap.descriptor.api.Descriptor)
*/
@Override
public void deploy(final Descriptor descriptor) throws DeploymentException {
throw new UnsupportedOperationException(ERROR_MESSAGE_DESCRIPTORS_UNSUPPORTED);
}
示例6: undeploy
import org.jboss.shrinkwrap.descriptor.api.Descriptor; //导入依赖的package包/类
/**
* @throws UnsupportedOperationException
* @see org.jboss.arquillian.container.spi.client.container.DeployableContainer#undeploy(org.jboss.shrinkwrap.descriptor.api.Descriptor)
*/
@Override
public void undeploy(final Descriptor descriptor) throws DeploymentException {
throw new UnsupportedOperationException(ERROR_MESSAGE_DESCRIPTORS_UNSUPPORTED);
}
示例7: deploy
import org.jboss.shrinkwrap.descriptor.api.Descriptor; //导入依赖的package包/类
@Override
public void deploy(Descriptor descriptor) throws DeploymentException {
}
示例8: undeploy
import org.jboss.shrinkwrap.descriptor.api.Descriptor; //导入依赖的package包/类
@Override
public void undeploy(Descriptor descriptor) throws DeploymentException {
}
示例9: deploy
import org.jboss.shrinkwrap.descriptor.api.Descriptor; //导入依赖的package包/类
@Override
public void deploy(final Descriptor descriptor) throws DeploymentException {
target.deploy(descriptor);
}
示例10: undeploy
import org.jboss.shrinkwrap.descriptor.api.Descriptor; //导入依赖的package包/类
@Override
public void undeploy(final Descriptor descriptor) throws DeploymentException {
target.undeploy(descriptor);
}
示例11: deploy
import org.jboss.shrinkwrap.descriptor.api.Descriptor; //导入依赖的package包/类
@Override
public void deploy(Descriptor descriptor) throws DeploymentException {
throw new UnsupportedOperationException("Not implemented");
}
示例12: undeploy
import org.jboss.shrinkwrap.descriptor.api.Descriptor; //导入依赖的package包/类
@Override
public void undeploy(Descriptor descriptor) throws DeploymentException {
throw new UnsupportedOperationException("Not implemented");
}
示例13: deploy
import org.jboss.shrinkwrap.descriptor.api.Descriptor; //导入依赖的package包/类
public void deploy(Descriptor descriptor) throws DeploymentException {
throw new UnsupportedOperationException("Not implemented");
}
示例14: undeploy
import org.jboss.shrinkwrap.descriptor.api.Descriptor; //导入依赖的package包/类
public void undeploy(Descriptor descriptor) throws DeploymentException {
throw new UnsupportedOperationException("Not implemented");
}
示例15: deploy
import org.jboss.shrinkwrap.descriptor.api.Descriptor; //导入依赖的package包/类
@Override
public void deploy(Descriptor descriptor) throws DeploymentException {
throw new UnsupportedOperationException();
}