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


Java ServerDeploymentManager.newDeploymentPlan方法代码示例

本文整理汇总了Java中org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager.newDeploymentPlan方法的典型用法代码示例。如果您正苦于以下问题:Java ServerDeploymentManager.newDeploymentPlan方法的具体用法?Java ServerDeploymentManager.newDeploymentPlan怎么用?Java ServerDeploymentManager.newDeploymentPlan使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager的用法示例。


在下文中一共展示了ServerDeploymentManager.newDeploymentPlan方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: deploy

import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager; //导入方法依赖的package包/类
@SuppressWarnings("ThrowableResultOfMethodCallIgnored")
private static void deploy(ServerDeploymentManager deploymentManager, String runtimeName, InputStream input) throws Throwable {
    ServerDeploymentPlanResult planResult;
    List<DeploymentAction> actions = new ArrayList<>();
    DeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
    AddDeploymentPlanBuilder addBuilder = builder.add(runtimeName, input);
    actions.add(addBuilder.getLastAction());
    builder = addBuilder.andDeploy();
    actions.add(builder.getLastAction());
    DeploymentPlan plan = builder.build();
    Future<ServerDeploymentPlanResult> future = deploymentManager.execute(plan);
    planResult = future.get();
    for (DeploymentAction action : actions) {
        ServerDeploymentActionResult actionResult = planResult.getDeploymentActionResult(action.getId());
        if (actionResult.getDeploymentException() != null) {
            throw actionResult.getDeploymentException();
        }
    }
}
 
开发者ID:fabric8io,项目名称:jube,代码行数:20,代码来源:Deployer.java

示例2: testInterrupted

import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager; //导入方法依赖的package包/类
@Test
public void testInterrupted() throws IOException {
    ServerDeploymentManager sdm = new MockServerDeploymentManager(new InterruptedException());
    DeploymentPlanBuilder builder = sdm.newDeploymentPlan();
    builder = builder.add("test", createTempFile());
    DeploymentPlanImpl planImpl = getDeploymentPlanImpl(builder);
    safeGet(sdm, planImpl);
    InputStream is = getInputStream(planImpl);
    assertNotClosed(is);

    builder = sdm.newDeploymentPlan();
    builder = builder.add("test", createTempFile());
    planImpl = getDeploymentPlanImpl(builder);
    safeGetWithTimeout(sdm, planImpl);
    is = getInputStream(planImpl);
    assertNotClosed(is);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:18,代码来源:InputStreamCleanupTestCase.java

示例3: testExecutionException

import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager; //导入方法依赖的package包/类
@Test
public void testExecutionException() throws IOException {
    ServerDeploymentManager sdm = new MockServerDeploymentManager(new ExecutionException(new Exception()));
    DeploymentPlanBuilder builder = sdm.newDeploymentPlan();
    builder = builder.add("test", createTempFile());
    DeploymentPlanImpl planImpl = getDeploymentPlanImpl(builder);
    safeGet(sdm, planImpl);
    InputStream is = getInputStream(planImpl);
    assertClosed(is);

    builder = sdm.newDeploymentPlan();
    builder = builder.add("test", createTempFile());
    planImpl = getDeploymentPlanImpl(builder);
    safeGetWithTimeout(sdm, planImpl);
    is = getInputStream(planImpl);
    assertClosed(is);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:18,代码来源:InputStreamCleanupTestCase.java

示例4: testRuntimeException

import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager; //导入方法依赖的package包/类
@Test
public void testRuntimeException() throws IOException {
    ServerDeploymentManager sdm = new MockServerDeploymentManager(new RuntimeException());
    DeploymentPlanBuilder builder = sdm.newDeploymentPlan();
    builder = builder.add("test", createTempFile());
    DeploymentPlanImpl planImpl = getDeploymentPlanImpl(builder);
    safeGet(sdm, planImpl);
    InputStream is = getInputStream(planImpl);
    assertClosed(is);

    builder = sdm.newDeploymentPlan();
    builder = builder.add("test", createTempFile());
    planImpl = getDeploymentPlanImpl(builder);
    safeGetWithTimeout(sdm, planImpl);
    is = getInputStream(planImpl);
    assertClosed(is);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:18,代码来源:InputStreamCleanupTestCase.java

示例5: testFileSuccess

import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager; //导入方法依赖的package包/类
@Test
public void testFileSuccess() throws IOException {
    ServerDeploymentManager sdm = new MockServerDeploymentManager();
    DeploymentPlanBuilder builder = sdm.newDeploymentPlan();
    builder = builder.add("test", createTempFile());
    DeploymentPlanImpl planImpl = getDeploymentPlanImpl(builder);
    safeGet(sdm, planImpl);
    InputStream is = getInputStream(planImpl);
    assertClosed(is);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:11,代码来源:InputStreamCleanupTestCase.java

示例6: testURLSuccess

import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager; //导入方法依赖的package包/类
@Test
public void testURLSuccess() throws IOException {
    ServerDeploymentManager sdm = new MockServerDeploymentManager();
    DeploymentPlanBuilder builder = sdm.newDeploymentPlan();
    builder = builder.add("test", createTempURL());
    DeploymentPlanImpl planImpl = getDeploymentPlanImpl(builder);
    safeGet(sdm, planImpl);
    InputStream is = getInputStream(planImpl);
    assertClosed(is);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:11,代码来源:InputStreamCleanupTestCase.java

示例7: testStreamSuccess

import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager; //导入方法依赖的package包/类
@Test
public void testStreamSuccess() throws IOException {
    ServerDeploymentManager sdm = new MockServerDeploymentManager();
    DeploymentPlanBuilder builder = sdm.newDeploymentPlan();
    createTempInputStream();
    builder = builder.add("test", testStream);
    DeploymentPlanImpl planImpl = getDeploymentPlanImpl(builder);
    safeGet(sdm, planImpl);
    assertNotClosed(testStream);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:11,代码来源:InputStreamCleanupTestCase.java

示例8: testSuccessfulCancel

import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager; //导入方法依赖的package包/类
@Test
public void testSuccessfulCancel() throws IOException {
    ServerDeploymentManager sdm = new MockServerDeploymentManager(true);
    DeploymentPlanBuilder builder = sdm.newDeploymentPlan();
    builder = builder.add("test", createTempFile());
    DeploymentPlanImpl planImpl = getDeploymentPlanImpl(builder);
    safeCancel(sdm, planImpl);
    InputStream is = getInputStream(planImpl);
    assertClosed(is);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:11,代码来源:InputStreamCleanupTestCase.java

示例9: testUnsuccessfulCancel

import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager; //导入方法依赖的package包/类
@Test
public void testUnsuccessfulCancel() throws IOException {
    ServerDeploymentManager sdm = new MockServerDeploymentManager(false);
    DeploymentPlanBuilder builder = sdm.newDeploymentPlan();
    builder = builder.add("test", createTempFile());
    DeploymentPlanImpl planImpl = getDeploymentPlanImpl(builder);
    safeCancel(sdm, planImpl);
    InputStream is = getInputStream(planImpl);
    assertNotClosed(is);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:11,代码来源:InputStreamCleanupTestCase.java

示例10: testTimeoutException

import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager; //导入方法依赖的package包/类
@Test
public void testTimeoutException() throws IOException {
    ServerDeploymentManager sdm = new MockServerDeploymentManager(new TimeoutException());
    DeploymentPlanBuilder builder = sdm.newDeploymentPlan();
    builder = builder.add("test", createTempFile());
    DeploymentPlanImpl planImpl = getDeploymentPlanImpl(builder);
    safeGetWithTimeout(sdm, planImpl);
    InputStream is = getInputStream(planImpl);
    assertNotClosed(is);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:11,代码来源:InputStreamCleanupTestCase.java


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