if (domain != null) {
if (domain.isRunningOrBlocked()) {
String snapshotName = slave.getSnapshotName();
if (snapshotName != null && snapshotName.length() > 0) {
taskListener.getLogger().println("Reverting to " + snapshotName + " and shutting down.");
domain.revertToSnapshot(domain.snapshotLookupByName(snapshotName));
} else {
taskListener.getLogger().println("Shutting down.");
System.err.println("method: " + slave.getShutdownMethod());
if (slave.getShutdownMethod().equals("suspend")) {