net.sf.borg.control
Class Borg

java.lang.Object
  extended by net.sf.borg.control.Borg
All Implemented Interfaces:
SocketHandler

public class Borg
extends Object
implements SocketHandler

The Main Class of Borg. It's responsible for starting up the model and spawning various threads, including the main UI thread and various timer threads. It also handles shutdown.


Method Summary
static Borg getReference()
          Gets the singleton.
static void main(String[] args)
          The main method.
 String processMessage(String msg)
          process a socket message
static void shutdown()
          close db connections and end the program
static void syncDBs()
          Sync dbs - mainly clears caches.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getReference

public static Borg getReference()
Gets the singleton.

Returns:
the singleton

main

public static void main(String[] args)
The main method.

Parameters:
args - the arguments

shutdown

public static void shutdown()
close db connections and end the program


syncDBs

public static void syncDBs()
                    throws Exception
Sync dbs - mainly clears caches. applies to mysql where outside clients can update the db.

Throws:
Exception - the exception

processMessage

public String processMessage(String msg)
process a socket message

Specified by:
processMessage in interface SocketHandler
Parameters:
msg - the msg
Returns:
the response string to be sent back to the socket client


Generated September 24 2010 by mbb using Apache Ant version 1.7.1 compiled on June 27 2008 and Java version 1.6.0_20 from Sun Microsystems Inc. on Linux i386 2.6.24-28-generic