speedscheduler.io
Class XmlScheduleIO

java.lang.Object
  extended byspeedscheduler.io.XmlScheduleIO
All Implemented Interfaces:
ScheduleIO

public class XmlScheduleIO
extends java.lang.Object
implements ScheduleIO

An implementation of ScheduleIO that persists Schedules to and loads Schedules from an XML file.


Field Summary
protected  int defaultMaxDownloadRate
           
protected  int defaultMaxUploadRate
           
protected  java.util.Vector schedules
           
protected  boolean schedulesLoaded
           
 
Constructor Summary
XmlScheduleIO()
           
 
Method Summary
 int getDefaultMaxDownloadRate()
           
 int getDefaultMaxUploadRate()
           
private  java.lang.String getSaveFileName()
          Helper function that tells us where to save the Schedules.
 java.util.Vector getSchedules()
           
 void loadSchedules()
           
 void saveSchedules(java.util.Vector schedulesToSave, int defaultMaxUploadRate, int defaultMaxDownloadRate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

schedules

protected java.util.Vector schedules

defaultMaxUploadRate

protected int defaultMaxUploadRate

defaultMaxDownloadRate

protected int defaultMaxDownloadRate

schedulesLoaded

protected boolean schedulesLoaded
Constructor Detail

XmlScheduleIO

public XmlScheduleIO()
Method Detail

saveSchedules

public void saveSchedules(java.util.Vector schedulesToSave,
                          int defaultMaxUploadRate,
                          int defaultMaxDownloadRate)
                   throws java.io.IOException
Specified by:
saveSchedules in interface ScheduleIO
Throws:
java.io.IOException
See Also:
ScheduleIO.saveSchedules(java.util.Vector, int, int)

loadSchedules

public void loadSchedules()
                   throws java.io.IOException
Specified by:
loadSchedules in interface ScheduleIO
Throws:
java.io.IOException
See Also:
ScheduleIO.loadSchedules()

getSchedules

public java.util.Vector getSchedules()
Specified by:
getSchedules in interface ScheduleIO
See Also:
ScheduleIO.getSchedules()

getDefaultMaxUploadRate

public int getDefaultMaxUploadRate()
Specified by:
getDefaultMaxUploadRate in interface ScheduleIO
See Also:
speedscheduler.ScheduleIO#getDefaultMaxUploadRate()

getDefaultMaxDownloadRate

public int getDefaultMaxDownloadRate()
Specified by:
getDefaultMaxDownloadRate in interface ScheduleIO
See Also:
speedscheduler.ScheduleIO#getDefaultMaxDownloadRate()

getSaveFileName

private java.lang.String getSaveFileName()
Helper function that tells us where to save the Schedules.