public void onServerInstanceLifecycle(
      final String host,
      final String server,
      Map<String, Object> params,
      final LifecycleOperation op) {

    if (window != null) window.hide();

    ServerInstanceOp serverInstanceOp =
        new ServerInstanceOp(
            op,
            params,
            new LifecycleCallback() {
              @Override
              public void onSuccess() {
                Console.info("Server " + op.name() + " succeeded: Server " + server);
                circuit.dispatch(new RefreshServer());
              }

              @Override
              public void onTimeout() {
                Console.warning("Request timeout");
                circuit.dispatch(new RefreshServer());
              }

              @Override
              public void onAbort() {
                Console.warning("Request aborted.");
                circuit.dispatch(new RefreshServer());
              }

              @Override
              public void onError(Throwable caught) {
                Console.error("Server " + op.name() + " failed", caught.getMessage());
                circuit.dispatch(new RefreshServer());
              }
            },
            dispatcher,
            hostInfoStore,
            host,
            server);
    serverInstanceOp.run();
  }
  @Override
  public void onCreateProperty(String reference, final PropertyRecord prop) {
    if (propertyWindow != null && propertyWindow.isShowing()) {
      propertyWindow.hide();
    }

    ModelNode address = new ModelNode();
    address.add("host", hostSelection.getName());
    address.add("server-config", reference);
    address.add("system-property", prop.getKey());

    CreatePropertyCmd cmd = new CreatePropertyCmd(dispatcher, factory, address);
    cmd.execute(
        prop,
        new SimpleCallback<Boolean>() {
          @Override
          public void onSuccess(Boolean result) {
            loadServerConfigurations();
          }
        });
  }
Esempio n. 3
0
 @Override
 public void closePropertyDialoge() {
   window.hide();
 }
 public void closeDialoge() {
   window.hide();
 }
 public void closeDialoge() {
   if (window != null && window.isShowing()) {
     window.hide();
   }
 }
Esempio n. 6
0
 public void hideWindow() {
   if (window != null) {
     window.hide();
   }
 }
 public void closeDialoge() {
   if (window != null) window.hide();
 }
 public void closeWindow() {
   if (window != null) window.hide();
 }
  public void onCreateServerConfig(final Server newServer) {

    circuit.dispatch(new AddServer(newServer));
    if (window != null) window.hide();
  }
 @Override
 public void onClick(ClickEvent event) {
   matchRulesWindow.hide();
 }