|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
edu.washington.cs.rfid.data.db.DeploymentDataConnection
public class DeploymentDataConnection
A wrapper for a SimpleDBConnection
that provides methods
for retrieving deployment metadata (i.e. data on readers, antennas, configuration, etc.)
from the RFID database. Also supports a remote connection to the data manager for
dynamic updates on deployment metadata which it can forward to listeners.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
DeploymentDataConnection(SimpleDBConnection db)
Creates a new DeploymentDataConnection using the given SimpleDBConnection . |
Method Summary | |
---|---|
void |
addListener(DeploymentDataConnectionListener l)
Adds a new DeploymentDataConnectionListener to the list of listeners. |
boolean |
endTransaction()
Stops a transaction by turning on auto commit mode for this connection. |
java.util.Hashtable<java.lang.Integer,java.util.Vector<java.lang.Integer>> |
getAdjacentAntennaHashtable()
Retrieves the adjacent antenna table from the database and returns it in a Hashtable . |
java.util.Hashtable<java.lang.Integer,java.util.Vector<AntMetadata>> |
getAntennaHashtable(int gatewayID)
Retrieves the antenna metadata for the antennas of readers connected to the specified gateway and returns it in a Hashtable . |
java.util.Vector<AntMetadata> |
getAntMetadataVector()
Retrieves the antenna metadata from the database and returns it in a Vector . |
java.util.Vector<RdrMetadata> |
getGatewayToRdrConfigVector(int gatewayID)
Retrieves the gateway to reader configuration information for a specified gateway and returns it in a Vector . |
java.util.Vector<RdrMetadata> |
getRdrMetadataVector()
Retrieves the reader metadata from the database and returns it in a Vector . |
java.util.Hashtable<java.lang.Integer,java.util.Hashtable<java.lang.Integer,java.lang.Boolean>> |
getVisibleAntennaHashtable()
Retrieves the visible antenna table from the database and returns it in a Hashtable . |
boolean |
insertAdjacentAnt(int antAID,
int antBID)
Inserts an adjacent antenna pair. |
boolean |
insertAntMetadata(AntMetadata ant)
Inserts the antenna metadata for a particular antenna. |
boolean |
insertRdrMetadata(RdrMetadata rdr)
Inserts the reader metadata for a particular reader. |
boolean |
insertVisibleAnt(int antAID,
int antBID)
Inserts a visible antenna pair. |
boolean |
rollback()
Rolls back database state to the last committed transaction. |
void |
run()
The run method from Thread |
boolean |
startTransaction()
Starts a transaction by turning off auto commit mode for this connection. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DeploymentDataConnection(SimpleDBConnection db)
DeploymentDataConnection
using the given SimpleDBConnection
.
db
- Method Detail |
---|
public boolean startTransaction()
public boolean rollback()
public boolean endTransaction()
public void addListener(DeploymentDataConnectionListener l)
DeploymentDataConnectionListener
to the list of listeners.
l
- The DeploymentDataConnectionListener
public java.util.Vector<RdrMetadata> getRdrMetadataVector()
Vector
.
Vector
containing all the reader metadatapublic java.util.Vector<AntMetadata> getAntMetadataVector()
Vector
.
Vector
containing all the antenna metadatapublic java.util.Hashtable<java.lang.Integer,java.util.Vector<AntMetadata>> getAntennaHashtable(int gatewayID)
Hashtable
.
gatewayID
- The gateway to retrieve the antenna metadata for
Hashtable\\>
public java.util.Hashtable<java.lang.Integer,java.util.Hashtable<java.lang.Integer,java.lang.Boolean>> getVisibleAntennaHashtable()
Hashtable
.
Hashtable
containing the visible antenna table.public java.util.Hashtable<java.lang.Integer,java.util.Vector<java.lang.Integer>> getAdjacentAntennaHashtable()
Hashtable
.
Hashtable
containing the adjacent antenna table.public java.util.Vector<RdrMetadata> getGatewayToRdrConfigVector(int gatewayID)
Vector
.
gatewayID
- The gateway to retrieve the configuration information for.
Vector
.public boolean insertRdrMetadata(RdrMetadata rdr)
The
- reader metadata
public boolean insertAntMetadata(AntMetadata ant)
The
- antenna metadata
public boolean insertVisibleAnt(int antAID, int antBID)
The
- visible antenna pair
public boolean insertAdjacentAnt(int antAID, int antBID)
The
- adjacent antenna pair
public void run()
Thread. Maintains a connection to the data manager over
which it receives updates regarding deployment data changes. For each received update,
it alerts all the DeploymentDataConnectionListeners.
- Specified by:
run
in interface java.lang.Runnable
- Overrides:
run
in class java.lang.Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |