pulling.executing
Class CompletionAnnouncer_Xgrid

java.lang.Object
  extended by pulling.executing.CompletionAnnouncer_Xgrid
All Implemented Interfaces:
java.lang.Runnable

public class CompletionAnnouncer_Xgrid
extends java.lang.Object
implements java.lang.Runnable

Author:
Majd Kokaly This thread has one simple job. It wakes up after a curtain amount of time and start pulling the server to check if a certain job is Completed. If that certain job is finished, it notifies the central Mapper. This thread is Xgrid dependent

Constructor Summary
CompletionAnnouncer_Xgrid(java.lang.String mapperHostName, java.lang.String password, ServerSideExecuter executer)
          This is the default constructor
 
Method Summary
 void closeStreams()
          This method closes all the input/output streams
 int getCompletionAnnouncerPort()
           
 int getCompletionServerPort()
           
 ServerSideExecuter getExecuter()
           
 java.lang.String getHostName()
           
 long getJobID()
           
 long getJobSecondaryID()
           
 java.lang.String getMapperHostName()
           
 java.lang.String getPassword()
           
 long getServerID()
           
 long getTimeToSleepAtStart()
           
 boolean isAlive()
           
 void run()
          This thread keeps doing the following 1) listens to the execution mapper.
 void setAlive(boolean alive)
           
 void setCompletionAnnouncerPort(int completionAnnouncerPort)
           
 void setCompletionServerPort(int completionServerPort)
           
 void setExecuter(ServerSideExecuter executer)
           
 void setHostName(java.lang.String hostName)
           
 void setJobID(long jobID)
           
 void setJobSecondaryID(long jobSecondaryID)
           
 void setMapperHostName(java.lang.String mapperHostName)
           
 void setPassword(java.lang.String mapperPassword)
           
 void setServerID(long serverID)
           
 void setTimeToSleepAtStart(long timeToSleepAtStart)
           
 void startThread()
          This method starts this thread (thisThread)
 void stopThread()
          This method stops this thread (thisThread)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompletionAnnouncer_Xgrid

public CompletionAnnouncer_Xgrid(java.lang.String mapperHostName,
                                 java.lang.String password,
                                 ServerSideExecuter executer)
This is the default constructor

Parameters:
mapperHostName - To set the mapperHostName.
password - To set the password field.
executer - To set the executer field
Method Detail

isAlive

public boolean isAlive()

setAlive

public void setAlive(boolean alive)

getMapperHostName

public java.lang.String getMapperHostName()

setMapperHostName

public void setMapperHostName(java.lang.String mapperHostName)

getCompletionServerPort

public int getCompletionServerPort()

setCompletionServerPort

public void setCompletionServerPort(int completionServerPort)

getCompletionAnnouncerPort

public int getCompletionAnnouncerPort()

setCompletionAnnouncerPort

public void setCompletionAnnouncerPort(int completionAnnouncerPort)

getHostName

public java.lang.String getHostName()

setHostName

public void setHostName(java.lang.String hostName)

getPassword

public java.lang.String getPassword()

setPassword

public void setPassword(java.lang.String mapperPassword)

getJobID

public long getJobID()

setJobID

public void setJobID(long jobID)

getJobSecondaryID

public long getJobSecondaryID()

setJobSecondaryID

public void setJobSecondaryID(long jobSecondaryID)

getServerID

public long getServerID()

setServerID

public void setServerID(long serverID)

getTimeToSleepAtStart

public long getTimeToSleepAtStart()

setTimeToSleepAtStart

public void setTimeToSleepAtStart(long timeToSleepAtStart)

getExecuter

public ServerSideExecuter getExecuter()

setExecuter

public void setExecuter(ServerSideExecuter executer)

startThread

public void startThread()
This method starts this thread (thisThread)


stopThread

public void stopThread()
This method stops this thread (thisThread)


closeStreams

public void closeStreams()
This method closes all the input/output streams


run

public void run()
This thread keeps doing the following 1) listens to the execution mapper. 2) When a job is submitted and a message is received this thread keeps sleeping and then checking the status of the currunt job. 3) When the job being executed is completed. It notifies the Completion Server on the Mapper side.

Specified by:
run in interface java.lang.Runnable