org.jenkinsci.plugins.jqsmonitoring.beingbuilt
Class RunningJob

java.lang.Object
  extended by org.jenkinsci.plugins.jqsmonitoring.beingbuilt.RunningJob

public class RunningJob
extends Object

Class representing a job that has been running.

Author:
yboev

Constructor Summary
RunningJob(LocalConfig lc, hudson.model.Executor executor, hudson.model.Slave slave)
          Constructor
 
Method Summary
 String getColor()
          Returns the color.
static ArrayList<RunningJob> getJobsRunningTooLong(ArrayList<hudson.model.Slave> slaves)
          Returns a list of jobs being build for too long.
 String getJobUrl()
          Returns the job url.
 String getName()
          Returns the name of the job.
 String getRemainingTime()
          return the remaining time as string that is human readable.
 String getRunningTime()
          Returns the time this job as been running.
 hudson.model.Slave getSlave()
          Returns the slave.
 String getSlaveUrl()
          Returns the slave url on which this job runs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunningJob

public RunningJob(LocalConfig lc,
                  hudson.model.Executor executor,
                  hudson.model.Slave slave)
Constructor

Parameters:
lc - local configuration.
executor - the executor.
slave - the slave.
Method Detail

getSlaveUrl

public String getSlaveUrl()
Returns the slave url on which this job runs.

Returns:
The url as String.

getJobUrl

public String getJobUrl()
Returns the job url.

Returns:
the url as String.

getColor

public String getColor()
Returns the color.

Returns:
the color as string. Format: #******.

getName

public String getName()
Returns the name of the job.

Returns:
the name as string

getSlave

public hudson.model.Slave getSlave()
Returns the slave.

Returns:
slave on which this job has been running.

getRunningTime

public String getRunningTime()
Returns the time this job as been running. Returns it as a string that is human readable.

Returns:
elapsed time in h m s format. where h can be > 24.

getRemainingTime

public String getRemainingTime()
return the remaining time as string that is human readable.

Returns:
the remaining time. it will return N/A if this could not be determined.

getJobsRunningTooLong

public static ArrayList<RunningJob> getJobsRunningTooLong(ArrayList<hudson.model.Slave> slaves)
Returns a list of jobs being build for too long.

Parameters:
slaves - list of all slaves
Returns:
returns these jobs that have been being built for more than a certain period of time. The period of time is determined by TimeFilter_1 in the configuration.


Copyright © 2004-2013. All Rights Reserved.