org.paneris.jammyjoes.upload
Class Warden

java.lang.Object
  extended by org.paneris.jammyjoes.upload.Warden
All Implemented Interfaces:
java.lang.Runnable

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

The Warden is a Thread which waits for 24 hours before generating and uploading new data for ecentives This thread becomes an org.melati.PoemThread by doing all its work inside a database.inSession() call. This ensures that there is a org.melati.PoemTransaction (think of sql transactions) available which can be commited or rolled back at any point by calling org.melati.PoremThread.commit() or org.melati.PoremThread.rollback()

See Also:
PoemThread.commit(), PoemThread.rollback(), org.melati.poem.Database#inSession()

Constructor Summary
Warden(WardenLauncher launcher)
          Constructor
 
Method Summary
 void ftpUpload()
           
 void generateFiles()
           
 void run()
          Thread run method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Warden

public Warden(WardenLauncher launcher)
Constructor

Allows the WardenLauncher to pass on parameters objects.

Method Detail

run

public void run()
Thread run method. Creates a transaction in our database, in which the warden does the rounds, and has a rest.

Specified by:
run in interface java.lang.Runnable

generateFiles

public void generateFiles()
                   throws java.lang.Exception
Throws:
java.lang.Exception

ftpUpload

public void ftpUpload()


Copyright © 2001-2008 PanEris. All Rights Reserved.