|
||||||||||
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.gateway.ReaderConnection
public class ReaderConnection
Maintains a connection to a reader, accepts incoming TRE packets and forwards
them to the ReaderGateway
.
Connection is established with SSL (128 bit AES).
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 | |
---|---|
ReaderConnection(RdrMetadata rdr,
int[] antIDs,
java.lang.String keyStorePath,
char[] keyStorePw,
long hashSalt)
Creates a new ReaderConnection with the specified parameters. |
Method Summary | |
---|---|
void |
addListener(ReaderConnectionListener l)
Adds a ReaderConnectionListener to the list of listeners. |
void |
run()
The run method from class Thread . |
void |
stopConnection()
Stops this ReaderConnection from reading. |
java.lang.String |
toString()
Returns a String representing this ReaderConnection . |
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, yield |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ReaderConnection(RdrMetadata rdr, int[] antIDs, java.lang.String keyStorePath, char[] keyStorePw, long hashSalt)
ReaderConnection
with the specified parameters.
rdr
- Metadata for the reader to connect toantIDs
- The IDs of the reader's antennas in ascending orderkeyStorePath
- Absolute path to the keystore to use for SSLkeyStorePw
- The password for the keystorehashSalt
- The initial salt for the hash functionMethod Detail |
---|
public void addListener(ReaderConnectionListener l)
ReaderConnectionListener
to the list of listeners.
l
- The ReaderConnectionListener
to addpublic void stopConnection()
ReaderConnection
from reading.
public void run()
run
method from class Thread
. Repeatedly tries to connect to
the reader via a socket connection. Once the connection handshake succeeds, it repeatedly
reads incoming TREs from the reader, parses them, and offers them to the ReaderGateway
.
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public java.lang.String toString()
String
representing this ReaderConnection
.
toString
in class java.lang.Thread
String
representing this ReaderConnection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |