Exemplo n.º 1
0
 public void start() {
   log.info("Starting server " + getLabel().getName());
   if (!ServerState.STOPPED.equals(getLabel().getState())) {
     throw new ServersViewException("Cannot start server because it is not stopped");
   }
   operateServerState("Start", ServerState.STARTED);
 }
Exemplo n.º 2
0
 public void profile() {
   log.info("Starting server in profiling mode" + getLabel().getName());
   if (!ServerState.STOPPED.equals(getLabel().getState())) {
     throw new ServersViewException("Cannot profile server because it is not stopped");
   }
   operateServerState("Profile", ServerState.PROFILING);
 }
Exemplo n.º 3
0
 public void debug() {
   log.info("Starting server in debug" + getLabel().getName());
   if (!ServerState.STOPPED.equals(getLabel().getState())) {
     throw new ServersViewException("Cannot debug server because it is not stopped");
   }
   operateServerState("Debug", ServerState.DEBUGGING);
 }
Exemplo n.º 4
0
  public void delete(boolean stopFirst) {
    final String name = getLabel().getName();
    log.info("Deleting server " + name + ". Stopping server first: " + stopFirst);
    select();
    ServerState state = getLabel().getState();

    new ContextMenu("Delete").select();
    new WaitUntil(new ShellWithTextIsActive("Delete Server"), TimePeriod.NORMAL);
    if (!ServerState.STOPPED.equals(state) && !ServerState.NONE.equals(state)) {
      new CheckBox().toggle(stopFirst);
    }
    new PushButton("OK").click();
    new WaitWhile(new ServerExists(name), TIMEOUT);
    new WaitWhile(new JobIsRunning(), TIMEOUT);
  }