|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
edu.harvard.deas.hyperenc.vsat.PageServerNode
public class PageServerNode
The PageServerNode represents a Page Server Node in the hyper-encryption system. It listens for page requests and responds to them. Each request consists of a 32-bit integer, the page request key. The PSN responds to a page request by sending back a 4096-byte page of random data; each page is served at most twice.
A PageServerNode is backed by a PageDatabase, which handles the details of page management. The PageServerNode itself receives requests and uses the contained request key to retrieve a page from the PageDatabase. It then sends this page back to the requester.
The request key is interpreted as a big-endian integer: the high byte comes first.
PageDatabase
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static int |
DEFAULT_PSN_PORT
The port on which the PSN listens for connections/requests. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
PageServerNode()
Creates a new Page Server Node using the default port. |
|
PageServerNode(int psn_port)
Creates a new Virtual Satellite node that listens for connections on psn_port . |
Method Summary | |
---|---|
boolean |
isShutdown()
Whether or not to shut down. |
static void |
main(String[] args)
Creates a PSN and runs it until the process is killed. |
void |
run()
The main thread of execution for the PSN. |
void |
shutdownNow()
Shut down the server now. |
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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_PSN_PORT
Constructor Detail |
---|
public PageServerNode()
public PageServerNode(int psn_port)
psn_port
.
This does all of the network setup as well
psn_port
- The port on which to listen for connections.Method Detail |
---|
public static void main(String[] args)
public boolean isShutdown()
public void shutdownNow()
public void run()
run
in interface Runnable
run
in class Thread
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |