Package org.swtpra1
Class TournamentControlMain
- java.lang.Object
-
- org.swtpra1.TournamentControlMain
-
public class TournamentControlMain extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description TournamentControlMain()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
exitApplication()
Shuts down gracefully, making sure to stop running threads if needed.static TournamentControl
loadTournamentControlFromFile(java.io.File file)
Loads the tournament control from a file.static void
main(java.lang.String[] args)
The main function which parses the command line arguments, creates a TournamentControl object with the given parameters polls new data and serializes existing data asynchronously.static void
printListFormatHelp(java.lang.String filename)
Prints list formatting help.
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
The main function which parses the command line arguments, creates a TournamentControl object with the given parameters polls new data and serializes existing data asynchronously.- Parameters:
args
- Given arguments.
-
loadTournamentControlFromFile
public static TournamentControl loadTournamentControlFromFile(java.io.File file) throws java.io.IOException, java.lang.ClassNotFoundException, java.io.InvalidClassException
Loads the tournament control from a file.- Parameters:
file
- The file from which the tournament control is loaded.- Returns:
- A tournament control.
- Throws:
java.io.IOException
- the file was corrupted in any way.java.lang.ClassNotFoundException
- deserializing a completely different object failsjava.io.InvalidClassException
-
printListFormatHelp
public static void printListFormatHelp(java.lang.String filename)
Prints list formatting help.- Parameters:
filename
- The file name which causes a problem.
-
exitApplication
public static void exitApplication()
Shuts down gracefully, making sure to stop running threads if needed.
-
-