net.tinyos.tinydb
Class TinyDBMain

java.lang.Object
  |
  +--net.tinyos.tinydb.TinyDBMain

public class TinyDBMain
extends java.lang.Object

TinyDBMain creates the main UI for the TinyDB java classes.


Field Summary
static int DATA_SIZE
           
static net.tinyos.message.MoteIF mif
           
static int MSG_SIZE
           
static net.tinyos.tinydb.TinyDBNetwork nw
           
 
Constructor Summary
TinyDBMain()
           
 
Method Summary
static void addQueryListener(net.tinyos.tinydb.QueryListener ql)
          Register the specified QueryListener.
static void initMain()
          Initialize the static variables that TinyDB needs to have set up to run Note that this does not show any of the TinyDB UI, so it can be used in apps that have their own user interface
static void initMain(java.lang.String configFileName)
          Initialize the static variables that TinyDB needs to have set up to run Note that this does not show any of the TinyDB UI, so it can be used in apps that have their own user interface
static void injectQuery(net.tinyos.tinydb.TinyDBQuery q, net.tinyos.tinydb.ResultListener rl)
          Helper routine to handle the common steps in sending a query into the network.
static void main(java.lang.String[] args)
           
static void notifyAddedQuery(net.tinyos.tinydb.TinyDBQuery q)
          Notify all currently registered QueryListeners with a addQuery message
static void notifyRemovedQuery(net.tinyos.tinydb.TinyDBQuery q)
          Notify all currently register QueryListeners with a removeQuery message
static void removeQueryListener(net.tinyos.tinydb.QueryListener ql)
          Deregister the specified QueryListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mif

public static net.tinyos.message.MoteIF mif

nw

public static net.tinyos.tinydb.TinyDBNetwork nw

DATA_SIZE

public static final int DATA_SIZE
See Also:
Constant Field Values

MSG_SIZE

public static final int MSG_SIZE
See Also:
Constant Field Values
Constructor Detail

TinyDBMain

public TinyDBMain()
Method Detail

main

public static void main(java.lang.String[] args)
Parameters:
args - the command line arguments

initMain

public static void initMain(java.lang.String configFileName)
                     throws java.io.IOException
Initialize the static variables that TinyDB needs to have set up to run Note that this does not show any of the TinyDB UI, so it can be used in apps that have their own user interface

java.io.IOException

initMain

public static void initMain()
                     throws java.io.IOException
Initialize the static variables that TinyDB needs to have set up to run Note that this does not show any of the TinyDB UI, so it can be used in apps that have their own user interface

java.io.IOException

injectQuery

public static void injectQuery(net.tinyos.tinydb.TinyDBQuery q,
                               net.tinyos.tinydb.ResultListener rl)
                        throws java.io.IOException
Helper routine to handle the common steps in sending a query into the network.

Parameters:
q - The query to inject
rl - The result listner to receive (processed) results from this query.
java.io.IOException

addQueryListener

public static void addQueryListener(net.tinyos.tinydb.QueryListener ql)
Register the specified QueryListener. The listener will be notified everytime notifyAddedQuery or notifyRemovedQuery is called.


removeQueryListener

public static void removeQueryListener(net.tinyos.tinydb.QueryListener ql)
Deregister the specified QueryListener


notifyAddedQuery

public static void notifyAddedQuery(net.tinyos.tinydb.TinyDBQuery q)
Notify all currently registered QueryListeners with a addQuery message


notifyRemovedQuery

public static void notifyRemovedQuery(net.tinyos.tinydb.TinyDBQuery q)
Notify all currently register QueryListeners with a removeQuery message