net.sf.borg.control
Class Borg

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

public class Borg
extends Object
implements SocketHandler, Observer

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
protected  URL getJarURL()
          Constructs a URL expression for the location to this current class, where it lives in the jar file.
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
 void update(Observable o, Object arg)
           
 
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


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

getJarURL

protected URL getJarURL()
                 throws MalformedURLException
Constructs a URL expression for the location to this current class, where it lives in the jar file.

Returns:
Throws:
MalformedURLException

update

public void update(Observable o,
                   Object arg)
Specified by:
update in interface Observer


Generated December 30 2011 by mbb using Apache Ant(TM) version 1.8.2 compiled on December 20 2010 and Java version 1.6.0_30 from Sun Microsystems Inc. on Linux i386 3.0.0-14-generic-pae