edu.columbia.cs.irt.sipcloud.gui
Class UIWaitingThread

java.lang.Object
  extended by java.lang.Thread
      extended by edu.columbia.cs.irt.sipcloud.gui.UIWaitingThread
All Implemented Interfaces:
java.lang.Runnable

public class UIWaitingThread
extends java.lang.Thread

UIWaitingThread makes UI wait until finishing LoadScalingManager's job

Author:
Jin Hyung Park [jp2105]

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
UIWaitingThread(java.lang.String str)
          Inherits Thread's class constructor
 
Method Summary
 boolean[] getBooleanArrayArgument()
          Get the current boolean array argument
 int getJobKind()
          Get the current job kind
 java.lang.String getStringArgument()
          Get the current string argument
 void run()
          Inherits Thread(Super Class)'s run function In MainWindow.java, to lunch or stop VM, we call LoadSclingManager's function; however, this function uses blocking I/O, so, during that time, GUI is blocked.
 void setBooleanArrayArgument(boolean[] arg)
          Set the boolean array argument
 void setJobKind(int jobKind)
          Set the kind of job
 void setStringArgument(java.lang.String arg)
          String Type Argument for calling LoadScalingManger's function
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, 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, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UIWaitingThread

public UIWaitingThread(java.lang.String str)
Inherits Thread's class constructor

Parameters:
str - Thread Name
Method Detail

setStringArgument

public void setStringArgument(java.lang.String arg)
String Type Argument for calling LoadScalingManger's function

Parameters:
arg - String Argument

getStringArgument

public java.lang.String getStringArgument()
Get the current string argument

Returns:
string argument

setBooleanArrayArgument

public void setBooleanArrayArgument(boolean[] arg)
Set the boolean array argument

Parameters:
arg - Boolean array

getBooleanArrayArgument

public boolean[] getBooleanArrayArgument()
Get the current boolean array argument

Returns:
Boolean array

setJobKind

public void setJobKind(int jobKind)
Set the kind of job

Parameters:
jobKind - Job Kind in Constants Class
See Also:
Class

getJobKind

public int getJobKind()
Get the current job kind

Returns:
Job Kind in Constants Class

run

public void run()
Inherits Thread(Super Class)'s run function In MainWindow.java, to lunch or stop VM, we call LoadSclingManager's function; however, this function uses blocking I/O, so, during that time, GUI is blocked. So, we prevent it by calling those functions in thread(this class).

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread