本文整理汇总了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();
}
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}