Class WebThread
java.lang.Object
org.h2.server.web.WebApp
org.h2.server.web.WebThread
- All Implemented Interfaces:
Runnable
-
Nested Class Summary
Nested classes/interfaces inherited from class WebApp
WebApp.IndexInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate Stringprivate Stringprivate InputStreamprotected OutputStreamprivate static final byte[]private static final byte[]protected final Socketprivate final ThreadFields inherited from class WebApp
attributes, cache, headerLanguage, mimeType, server, session, stop -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringStop the application and the server.private booleanallow()private booleanprivate StringgetAllowedFile(String requestedFile) private static StringgetHeaderLineValue(String line) (package private) voidjoin(int millis) Wait until the thread is stopped.private voidprivate voidprivate booleanprivate booleanprocess()private Stringvoidrun()(package private) voidstart()Start the thread.(package private) voidstopNow()Close the connection now.private voidprivate voidwriteSimple(String status, byte[] bytes) private voidwriteSimple(String status, String text) Methods inherited from class WebApp
getCache, getMimeType, getSession, processRequest, query, setSession
-
Field Details
-
RN
private static final byte[] RN -
RNRN
private static final byte[] RNRN -
output
-
socket
-
thread
-
input
-
host
-
dataLength
private int dataLength -
ifModifiedSince
-
-
Constructor Details
-
WebThread
-
-
Method Details
-
start
void start()Start the thread. -
join
Wait until the thread is stopped.- Parameters:
millis- the maximum number of milliseconds to wait- Throws:
InterruptedException- if interrupted
-
stopNow
void stopNow()Close the connection now. -
getAllowedFile
-
run
-
process
- Throws:
IOException
-
writeSimple
- Throws:
IOException
-
writeSimple
- Throws:
IOException
-
checkHost
- Throws:
IOException
-
readHeaderLine
- Throws:
IOException
-
parseBodyAttributes
- Throws:
IOException
-
parseAttributes
-
parseHeader
- Throws:
IOException
-
getHeaderLineValue
-
adminShutdown
Description copied from class:WebAppStop the application and the server.- Overrides:
adminShutdownin classWebApp- Returns:
- the page to display
-
allow
private boolean allow() -
trace
-