Package org.codehaus.plexus.taskqueue

Examples of org.codehaus.plexus.taskqueue.Task


            Map<String, Task> currentCheckouts = new HashMap<String, Task>();
            Set<Integer> keys = overallBuildQueues.keySet();
            for ( Integer key : keys )
            {
                OverallBuildQueue overallBuildQueue = overallBuildQueues.get( key );
                Task task = overallBuildQueue.getCheckoutTaskQueueExecutor().getCurrentTask();
                if ( task != null )
                {
                    currentCheckouts.put( overallBuildQueue.getName(), task );
                }
            }
View Full Code Here


    {
        try
        {
            TaskQueueExecutor executor =
                (TaskQueueExecutor) container.lookup( TaskQueueExecutor.class, "prepare-build-project" );
            Task task = executor.getCurrentTask();
            if ( task != null )
            {
                executor.cancelTask( task );
            }
        }
View Full Code Here

    }

    public int getCurrentProjectInBuilding()
        throws TaskQueueManagerException
    {
        Task task = getBuildTaskQueueExecutor().getCurrentTask();
        if ( task != null )
        {
            if ( task instanceof BuildProjectTask )
            {
                return ( (BuildProjectTask) task ).getProjectId();
View Full Code Here

    }

    private boolean cancelCurrentBuild()
        throws TaskQueueManagerException
    {
        Task task = getBuildTaskQueueExecutor().getCurrentTask();
       
        if ( task != null )
        {
            if ( task instanceof BuildProjectTask )
            {
View Full Code Here

      Map<String, Task> currentBuilds = getContinuum().getBuildsManager().getCurrentBuilds();
      Set<String> keySet = currentBuilds.keySet();
     
      for( String key : keySet )
      {
          Task task = currentBuilds.get( key );
          if ( task != null )
          {
              if ( task instanceof BuildProjectTask )
              {
                  return ( (BuildProjectTask) task ).getProjectId();
View Full Code Here

        if ( tasks != null )
        {
            Set<String> keySet = tasks.keySet();
            for ( String key : keySet )
            {
                Task task = tasks.get( key );
                if ( task != null && task instanceof CheckOutTask )
                {
                    if ( ( (CheckOutTask) task ).getProjectId() == projectId )
                    {
                        logger.info( "Cancelling checkout for project " + projectId );
View Full Code Here

    {
        try
        {
            TaskQueueExecutor executor =
                (TaskQueueExecutor) container.lookup( TaskQueueExecutor.class, "prepare-build-project" );
            Task task = executor.getCurrentTask();
            if ( task != null )
            {
                executor.cancelTask( task );
            }
        }
View Full Code Here

    }

    public PrepareBuildProjectsTask getCurrentProjectInPrepareBuild()
        throws BuildManagerException
    {
        Task task = getPrepareBuildTaskQueueExecutor().getCurrentTask();

        if ( task != null )
        {
            return (PrepareBuildProjectsTask) task;
        }
View Full Code Here

    }

    private void assertNextBuildIs( int expectedProjectId )
        throws Exception
    {
        Task task = buildQueue.take();

        assertEquals( BuildProjectTask.class.getName(), task.getClass().getName() );

        BuildProjectTask buildProjectTask = (BuildProjectTask) task;

        assertEquals( "Didn't get the expected project id.", expectedProjectId, buildProjectTask.getProjectId() );
    }
View Full Code Here

    }

    private void assertNextBuildIsNull()
        throws Exception
    {
        Task task = buildQueue.take();

        if ( task != null )
        {
            fail( "Got a non-null build task returned. Project id: " + ( (BuildProjectTask) task ).getProjectId() );
        }
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.taskqueue.Task

Copyright © 2018 www.massapicom. 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.