Class KHTTPServerThreadSample
java.lang.Object
java.lang.Thread
ch.k43.util.KSocketServerThread
ch.k43.util.KHTTPServerThread
ch.k43.util.KHTTPServerThreadSample
- All Implemented Interfaces:
AutoCloseable
,Runnable
Simple HTTP web server to serve files.
- Since:
- 2025.04.12
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class ch.k43.util.KHTTPServerThread
connect, delete, getMaxPayloadSize, getRequestHeaders, head, options, patch, post, put, run, sendFile, sendFile, sendHTML, sendText, sendText, setMaxPayloadSize, setResponseHeaders, toString, trace
Methods inherited from class ch.k43.util.KSocketServerThread
close, getAuthenticatedClient, getAuthenticatedClientCN, getCiphers, getLastError, getProtocol, isConnected, isDataAvailable, isSecuredConnection, read, readLine, write, write, write, writeLine
Methods inherited from class java.lang.Thread
activeCount, checkAccess, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, threadId, yield
-
Constructor Details
-
KHTTPServerThreadSample
Thread constructor.- Parameters:
argSocket
- Socket passed by the KSocketServerListener during thread initialization
-
-
Method Details
-
get
HTTP GET method: Send file.- Overrides:
get
in classKHTTPServerThread
- Parameters:
argURL
- Passed URL e.g. "/test/s=any"
-