com.phenix.pct
Class BackgroundWorker

java.lang.Object
  extended by com.phenix.pct.BackgroundWorker
Direct Known Subclasses:
PCTBgCompile.CompilationBackgroundWorker, PCTBgCRC.CRCThreadStatus

public abstract class BackgroundWorker
extends Object


Nested Class Summary
static class BackgroundWorker.Message
           
 
Field Summary
 boolean quit
           
 
Constructor Summary
BackgroundWorker(PCTBgRun parent)
           
 
Method Summary
 int getThreadNumber()
           
abstract  void handleResponse(String command, String parameter, boolean err, String customResponse, List returnValues)
          This is where you can handle responses from the Progress process TODO Handle dbConnection failures to stop process...
 void initialize(Socket socket)
           
 boolean isStandardCommand(String command)
           
 void listen()
           
 void performAction()
           
protected abstract  boolean performCustomAction()
          This is where you code the task's logic
 void quit()
           
 void sendCommand(String command, String param)
           
abstract  void setCustomOptions(Map options)
           
 void setDBConnections(Iterator dbConnections)
           
 void setPropath(Iterator propath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

quit

public boolean quit
Constructor Detail

BackgroundWorker

public BackgroundWorker(PCTBgRun parent)
Method Detail

initialize

public final void initialize(Socket socket)
                      throws IOException
Throws:
IOException

setDBConnections

public final void setDBConnections(Iterator dbConnections)

setPropath

public final void setPropath(Iterator propath)

getThreadNumber

public final int getThreadNumber()

sendCommand

public final void sendCommand(String command,
                              String param)
                       throws IOException
Throws:
IOException

listen

public final void listen()

performAction

public final void performAction()
                         throws IOException
Throws:
IOException

isStandardCommand

public final boolean isStandardCommand(String command)

quit

public final void quit()

performCustomAction

protected abstract boolean performCustomAction()
                                        throws IOException
This is where you code the task's logic

Throws:
IOException

setCustomOptions

public abstract void setCustomOptions(Map options)
Parameters:
options -

handleResponse

public abstract void handleResponse(String command,
                                    String parameter,
                                    boolean err,
                                    String customResponse,
                                    List returnValues)
This is where you can handle responses from the Progress process TODO Handle dbConnection failures to stop process...

Parameters:
command - Command sent
parameter - Command's parameter
err - An error was returned
customResponse - Custom response sent by Progress
returnValues - List of Message objects


Copyright © 2003-2011 Gilles QUERRET. All Rights Reserved.