|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
de.dfki.lt.mary.RequestHandler
public class RequestHandler
A lightweight process handling one Request in a thread of its own. This is to be used when running as a socket server.
| Nested Class Summary | |
|---|---|
static class |
RequestHandler.StreamingOutputWriter
|
| 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 | |
|---|---|
RequestHandler(Request request,
java.net.Socket infoSocket,
java.net.Socket dataSocket,
java.io.Reader inputReader)
Constructor to be used for Socket processing (running as a standalone socket server). |
|
| Method Summary | |
|---|---|
void |
run()
Perform the actual processing by calling the appropriate methods of the associated Request object. |
| 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 |
| Constructor Detail |
|---|
public RequestHandler(Request request,
java.net.Socket infoSocket,
java.net.Socket dataSocket,
java.io.Reader inputReader)
inputReader is a Reader reading from from
dataSocket.inputStream(). Passing this on is necessary
because the mary server does a buffered read on that input stream, and
without passing that buffered reader on, data gets lost.
| Method Detail |
|---|
public void run()
Request object.
Note that while different request handlers run as different threads,
they all use the same module objects. How a given module deals with
several requests simultaneously is its own problem, the simplest
solution being a synchronized process() method.
run in interface java.lang.Runnablerun in class java.lang.ThreadRequest,
MaryModule,
ExternalModule,
InternalModule
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||