Package org.h2.server.web
Class WebThread
java.lang.Object
org.h2.server.web.WebApp
org.h2.server.web.WebThread
- All Implemented Interfaces:
Runnable
For each connection to a session, an object of this class is created.
This class is used by the H2 Console.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.h2.server.web.WebApp
WebApp.IndexInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private String
private String
private InputStream
protected OutputStream
private static final byte[]
private static final byte[]
protected final Socket
private final Thread
Fields inherited from class org.h2.server.web.WebApp
attributes, cache, headerLanguage, mimeType, server, session, stop
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Stop the application and the server.private boolean
allow()
private boolean
private String
getAllowedFile
(String requestedFile) private static String
getHeaderLineValue
(String line) (package private) void
join
(int millis) Wait until the thread is stopped.private void
private void
private boolean
private boolean
process()
private String
void
run()
(package private) void
start()
Start the thread.(package private) void
stopNow()
Close the connection now.private void
private void
writeSimple
(String status, byte[] bytes) private void
writeSimple
(String status, String text) Methods inherited from class org.h2.server.web.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
public void 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:WebApp
Stop the application and the server.- Overrides:
adminShutdown
in classWebApp
- Returns:
- the page to display
-
allow
private boolean allow() -
trace
-