Examples of ProgressEvent


Examples of org.eclipse.zest.layouts.progress.ProgressEvent

      listener.progressStarted(event);
    }
  }

  protected void fireProgressEnded(int totalNumberOfSteps) {
    ProgressEvent event = new ProgressEvent(totalNumberOfSteps, totalNumberOfSteps);
    for (int i = 0; i < progressListeners.size(); i++) {
      ProgressListener listener = (ProgressListener) progressListeners.get(i);
      listener.progressEnded(event);
    }
View Full Code Here

Examples of org.eclipse.zest.layouts.progress.ProgressEvent

    // Update the layout locations to the external nodes
    Calendar now = Calendar.getInstance();
    now.add(Calendar.MILLISECOND, -MIN_TIME_DELAY_BETWEEN_PROGRESS_EVENTS);

    if (now.after(lastProgressEventFired) || currentStep == totalNumberOfSteps) {
      ProgressEvent event = new ProgressEvent(currentStep, totalNumberOfSteps);

      for (int i = 0; i < progressListeners.size(); i++) {

        ProgressListener listener = (ProgressListener) progressListeners.get(i);
        listener.progressUpdated(event);
View Full Code Here

Examples of org.jboss.deployers.spi.management.deploy.ProgressEvent

   {
      SerializableDeploymentStatus status = new SerializableDeploymentStatus(command, StateType.DEPLOYING);
      status.setMessage("Running distribute to: "+targets);
      status.setRunning(true);
      currentStatus = status;
      ProgressEvent event =  new ProgressEvent(deployment, currentStatus);
      notify(event);
      for(DeploymentTarget target : targets)
      {
         if(isCancelled)
         {
            status = new SerializableDeploymentStatus(command, StateType.CANCELLED);
            status.setMessage("Distribute has been cancelled");
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
            break;
         }

         try
         {
            // TODO, percent complete info in upload and overall distribute
            status = new SerializableDeploymentStatus(command, StateType.UPLOADING);
            status.setTarget(target);
            status.setRunning(true);
            status.setMessage("Begining distribute to target: "+target);
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);

            // TODO, cancellation of in progress distribution
            target.distribute(deployment);
            status = new SerializableDeploymentStatus(command, StateType.DEPLOYING);
            status.setTarget(target);
            status.setMessage("Completed distribute to target: "+target);
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
         }
         catch(Exception e)
         {
            status = new SerializableDeploymentStatus(command, StateType.FAILED);
            status.setTarget(target);
            status.setFailure(e);
            status.setFailed(true);
            currentStatus = status;
            ProgressEvent error = new ProgressEvent(deployment, currentStatus);
            notify(error);
            break;
         }
      }

      if(currentStatus.isFailed() == false)
      {
         status = new SerializableDeploymentStatus(command, StateType.COMPLETED);
         status.setMessage("Completed distribute to all targets");
         currentStatus = status;
         event =  new ProgressEvent(deployment, currentStatus);
         notify(event);        
      }
      status.setCompleted(true);
   }
View Full Code Here

Examples of org.jboss.deployers.spi.management.deploy.ProgressEvent

   {
      SerializableDeploymentStatus status = new SerializableDeploymentStatus(command, StateType.RUNNING);
      status.setMessage("Running start to: "+targets);
      status.setRunning(true);
      currentStatus = status;
      ProgressEvent event =  new ProgressEvent(deployment, currentStatus);
      notify(event);
      for(DeploymentTarget target : targets)
      {
         if(isCancelled)
         {
            status = new SerializableDeploymentStatus(command, StateType.CANCELLED);
            status.setMessage("Start has been cancelled");
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
            break;
         }

         try
         {
            target.start(deployment);
            status = new SerializableDeploymentStatus(command, StateType.COMPLETED);
            status.setTarget(target);
            status.setMessage("Completed start for target: "+target);
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
         }
         catch(Exception e)
         {
            status = new SerializableDeploymentStatus(command, StateType.FAILED);
            status.setTarget(target);
            status.setFailure(e);
            status.setFailed(true);
            currentStatus = status;
            ProgressEvent error = new ProgressEvent(deployment, currentStatus);
            notify(error);
            break;
         }
      }
      status.setCompleted(true);
View Full Code Here

Examples of org.jboss.deployers.spi.management.deploy.ProgressEvent

   {
      SerializableDeploymentStatus status = new SerializableDeploymentStatus(command, StateType.RUNNING);
      status.setMessage("Running stop to: "+targets);
      status.setRunning(true);
      currentStatus = status;
      ProgressEvent event =  new ProgressEvent(deployment, currentStatus);
      notify(event);
      for(DeploymentTarget target : targets)
      {
         if(isCancelled)
         {
            status = new SerializableDeploymentStatus(command, StateType.CANCELLED);
            status.setMessage("Stop has been cancelled");
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
            break;
         }

         try
         {
            target.stop(deployment);
            status = new SerializableDeploymentStatus(command, StateType.COMPLETED);
            status.setTarget(target);
            status.setMessage("Completed stop for target: "+target);
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
         }
         catch(Exception e)
         {
            status = new SerializableDeploymentStatus(command, StateType.FAILED);
            status.setTarget(target);
            status.setFailure(e);
            status.setFailed(true);
            currentStatus = status;
            ProgressEvent error = new ProgressEvent(deployment, currentStatus);
            notify(error);
            break;
         }
      }
      status.setCompleted(true);
View Full Code Here

Examples of org.jboss.deployers.spi.management.deploy.ProgressEvent

   {
      SerializableDeploymentStatus status = new SerializableDeploymentStatus(command, StateType.RUNNING);
      status.setMessage("Running undeploy to: "+targets);
      status.setRunning(true);
      currentStatus = status;
      ProgressEvent event =  new ProgressEvent(deployment, currentStatus);
      notify(event);
      for(DeploymentTarget target : targets)
      {
         if(isCancelled)
         {
            status = new SerializableDeploymentStatus(command, StateType.CANCELLED);
            status.setMessage("Undeploy has been cancelled");
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
            break;
         }

         try
         {
            target.remove(deployment);
            status = new SerializableDeploymentStatus(command, StateType.COMPLETED);
            status.setTarget(target);
            status.setMessage("Completed undeploy for target: "+target);
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
         }
         catch(Exception e)
         {
            status = new SerializableDeploymentStatus(command, StateType.FAILED);
            status.setTarget(target);
            status.setFailure(e);
            status.setFailed(true);
            currentStatus = status;
            ProgressEvent error = new ProgressEvent(deployment, currentStatus);
            notify(error);
            break;
         }
      }
      status.setCompleted(true);
View Full Code Here

Examples of org.jboss.deployers.spi.management.deploy.ProgressEvent

   {
      SerializableDeploymentStatus status = new SerializableDeploymentStatus(command, StateType.RUNNING);
      status.setMessage("Running redeploy to: "+targets);
      status.setRunning(true);
      currentStatus = status;
      ProgressEvent event =  new ProgressEvent(deployment, currentStatus);
      notify(event);
      for(DeploymentTarget target : targets)
      {
         if(isCancelled)
         {
            status = new SerializableDeploymentStatus(command, StateType.CANCELLED);
            status.setMessage("Redeploy has been cancelled");
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
            break;
         }

         try
         {
            target.redeploy(deployment);
            status = new SerializableDeploymentStatus(command, StateType.COMPLETED);
            status.setTarget(target);
            status.setMessage("Completed redeploy for target: "+target);
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
         }
         catch(Exception e)
         {
            status = new SerializableDeploymentStatus(command, StateType.FAILED);
            status.setTarget(target);
            status.setFailure(e);
            status.setFailed(true);
            currentStatus = status;
            ProgressEvent error = new ProgressEvent(deployment, currentStatus);
            notify(error);
            break;
         }
      }
      status.setCompleted(true);
View Full Code Here

Examples of org.jboss.deployers.spi.management.deploy.ProgressEvent

   {
      SerializableDeploymentStatus status = new SerializableDeploymentStatus(command, StateType.RUNNING);
      status.setMessage("Running prepare to: "+targets);
      status.setRunning(true);
      currentStatus = status;
      ProgressEvent event =  new ProgressEvent(deployment, currentStatus);
      notify(event);
      for(DeploymentTarget target : targets)
      {
         if(isCancelled)
         {
            status = new SerializableDeploymentStatus(command, StateType.CANCELLED);
            status.setMessage("Prepare has been cancelled");
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
            break;
         }

         try
         {
            target.prepare(deployment);
            status = new SerializableDeploymentStatus(command, StateType.COMPLETED);
            status.setTarget(target);
            status.setMessage("Completed prepare for target: "+target);
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
         }
         catch(Exception e)
         {
            status = new SerializableDeploymentStatus(command, StateType.FAILED);
            status.setTarget(target);
            status.setFailure(e);
            status.setFailed(true);
            currentStatus = status;
            ProgressEvent error = new ProgressEvent(deployment, currentStatus);
            notify(error);
            break;
         }
      }
      status.setCompleted(true);
View Full Code Here

Examples of org.jboss.deployers.spi.management.deploy.ProgressEvent

   {
      SerializableDeploymentStatus status = new SerializableDeploymentStatus(command, StateType.DEPLOYING);
      status.setMessage("Running distribute to: "+targets);
      status.setRunning(true);
      currentStatus = status;
      ProgressEvent event =  new ProgressEvent(deployment, currentStatus);
      notify(event);
      for(DeploymentTarget target : targets)
      {
         if(isCancelled)
         {
            status = new SerializableDeploymentStatus(command, StateType.CANCELLED);
            status.setMessage("Distribute has been cancelled");
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
            break;
         }

         try
         {
            // TODO, percent complete info in upload and overall distribute
            status = new SerializableDeploymentStatus(command, StateType.UPLOADING);
            status.setTarget(target);
            status.setRunning(true);
            status.setMessage("Begining distribute to target: "+target);
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);

            // TODO, cancellation of in progress distribution
            target.distribute(deployment);
            status = new SerializableDeploymentStatus(command, StateType.DEPLOYING);
            status.setTarget(target);
            status.setMessage("Completed distribute to target: "+target);
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
         }
         catch(Exception e)
         {
            status = new SerializableDeploymentStatus(command, StateType.FAILED);
            status.setTarget(target);
            status.setFailure(e);
            status.setFailed(true);
            currentStatus = status;
            ProgressEvent error = new ProgressEvent(deployment, currentStatus);
            notify(error);
            break;
         }
      }

      if(currentStatus.isFailed() == false)
      {
         status = new SerializableDeploymentStatus(command, StateType.COMPLETED);
         status.setMessage("Completed distribute to all targets");
         status.setCompleted(true);
         currentStatus = status;
         event =  new ProgressEvent(deployment, currentStatus);
         notify(event);        
      }
   }
View Full Code Here

Examples of org.jboss.deployers.spi.management.deploy.ProgressEvent

   {
      SerializableDeploymentStatus status = new SerializableDeploymentStatus(command, StateType.RUNNING);
      status.setMessage("Running start to: "+targets);
      status.setRunning(true);
      currentStatus = status;
      ProgressEvent event =  new ProgressEvent(deployment, currentStatus);
      notify(event);
      for(DeploymentTarget target : targets)
      {
         if(isCancelled)
         {
            status = new SerializableDeploymentStatus(command, StateType.CANCELLED);
            status.setMessage("Start has been cancelled");
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
            break;
         }

         try
         {
            target.start(deployment);
            status = new SerializableDeploymentStatus(command, StateType.COMPLETED);
            status.setTarget(target);
            status.setMessage("Completed start for target: "+target);
            status.setCompleted(true);
            currentStatus = status;
            event =  new ProgressEvent(deployment, currentStatus);
            notify(event);
         }
         catch(Exception e)
         {
            status = new SerializableDeploymentStatus(command, StateType.FAILED);
            status.setTarget(target);
            status.setFailure(e);
            status.setFailed(true);
            currentStatus = status;
            ProgressEvent error = new ProgressEvent(deployment, currentStatus);
            notify(error);
            break;
         }
      }
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.