com.ptc.wvs.server.cadagent
Class WorkerMessages

java.lang.Object
  extended byjava.lang.Thread
      extended bycom.ptc.wvs.server.cadagent.WorkerMessages
All Implemented Interfaces:
Runnable

public class WorkerMessages
extends Thread


Field Summary
private  Socket agentSocket
           
private  String command
           
private  String commandClass
           
private  boolean debug
           
private  String directory
           
private  String hostname
           
private  Log outputLog
           
private  int port
           
private  int sleepTime
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
(package private) WorkerMessages()
           
 
Method Summary
 void closeSocket()
           
 boolean connect(String hostname, int port)
           
protected  void finalize()
           
 String getCommand()
           
 String getCommandClass()
           
 String getDirectory()
           
 String getMessage(Socket clientSocket)
           
 boolean isDebug()
           
 void log(String message)
           
 void run()
           
 void sendMessage(String message)
           
 void setCommand(String command)
           
 void setCommandClass(String commandClass)
           
 void setDebug(boolean debug)
           
 void setDirectory(String directory)
           
 void setOutputLog(String logfile, String directory)
           
 void setSleepTime(int sleepTime)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

agentSocket

private Socket agentSocket

hostname

private String hostname

port

private int port

command

private String command

commandClass

private String commandClass

directory

private String directory

debug

private boolean debug

sleepTime

private int sleepTime

outputLog

private Log outputLog
Constructor Detail

WorkerMessages

WorkerMessages()
Method Detail

setSleepTime

public void setSleepTime(int sleepTime)

setCommand

public void setCommand(String command)

getCommand

public String getCommand()

setCommandClass

public void setCommandClass(String commandClass)

getCommandClass

public String getCommandClass()

setDirectory

public void setDirectory(String directory)

getDirectory

public String getDirectory()

setDebug

public void setDebug(boolean debug)

isDebug

public boolean isDebug()

setOutputLog

public void setOutputLog(String logfile,
                         String directory)

log

public void log(String message)

connect

public boolean connect(String hostname,
                       int port)
                throws Exception
Throws:
Exception

closeSocket

public void closeSocket()
                 throws Exception
Throws:
Exception

run

public void run()

getMessage

public String getMessage(Socket clientSocket)
                  throws IOException
Throws:
IOException

sendMessage

public void sendMessage(String message)

finalize

protected void finalize()