|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
com.sonyericsson.hudson.plugins.gerrit.trigger.GerritProjectListUpdater
public class GerritProjectListUpdater
Class responsible for providing the Config object with a list of all available Gerrit projects. Executed periodically on a timely basis and every time the connection to the Gerrit server has been restored.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static String |
GERRIT_LS_PROJECTS
The command for fetching projects. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
GerritProjectListUpdater(String serverName)
Standard constructor. |
Method Summary | |
---|---|
void |
connectionDown()
|
void |
connectionEstablished()
|
List<String> |
getGerritProjects()
Returns a string list of Gerrit projects. |
boolean |
isConnected()
|
static List<String> |
readProjects(Reader commandReader)
Reads a list of Gerrit projects from a Reader, one project per line. |
void |
run()
|
void |
setConnected(boolean connected)
|
void |
setGerritProjects(List<String> projects)
Sets the internal Gerrit project list. |
void |
shutdown()
Shutdown the thread. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String GERRIT_LS_PROJECTS
Constructor Detail |
---|
public GerritProjectListUpdater(String serverName)
serverName
- the name of the Gerrit server.Method Detail |
---|
public void connectionEstablished()
connectionEstablished
in interface ConnectionListener
public void connectionDown()
connectionDown
in interface ConnectionListener
public void shutdown()
public void run()
run
in interface Runnable
run
in class Thread
public static List<String> readProjects(Reader commandReader) throws IOException
commandReader
- the Reader.
IOException
- if something unfortunate happens.public boolean isConnected()
public void setConnected(boolean connected)
connected
- the connected to set.public void setGerritProjects(List<String> projects)
projects
- The list of projectspublic List<String> getGerritProjects()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |