public final class InspectorServer extends org.nanohttpd.protocols.websockets.NanoWSD implements InspectorWSConnection
HEADER_CONNECTION, HEADER_CONNECTION_VALUE, HEADER_UPGRADE, HEADER_UPGRADE_VALUE, HEADER_WEBSOCKET_ACCEPT, HEADER_WEBSOCKET_KEY, HEADER_WEBSOCKET_PROTOCOL, HEADER_WEBSOCKET_VERSION, HEADER_WEBSOCKET_VERSION_VALUE, LOGasyncRunner, CONTENT_DISPOSITION_ATTRIBUTE_PATTERN, CONTENT_DISPOSITION_ATTRIBUTE_REGEX, CONTENT_DISPOSITION_PATTERN, CONTENT_DISPOSITION_REGEX, CONTENT_TYPE_PATTERN, CONTENT_TYPE_REGEX, hostname, interceptors, MIME_HTML, MIME_PLAINTEXT, MIME_TYPES, myPort, SOCKET_READ_TIMEOUT| Modifier and Type | Method and Description |
|---|---|
void |
close(Token token)
Close the web socket server on the specific path.
|
void |
consoleAPICall(Token token,
String type,
Object text) |
protected org.nanohttpd.protocols.http.ClientHandler |
createClientHandler(Socket finalAccept,
InputStream inputStream) |
static InspectorServer |
get(InetSocketAddress isa,
Token token,
String pathContainingToken,
InspectorExecutionContext context,
boolean debugBrk,
boolean secure,
KeyStoreOptions keyStoreOptions,
ConnectionWatcher connectionWatcher,
InspectServerSession initialSession) |
int |
getPort() |
protected org.nanohttpd.protocols.websockets.WebSocket |
openWebSocket(org.nanohttpd.protocols.http.IHTTPSession handshake) |
void |
stop() |
handleWebSocket, isWebsocketRequested, makeAcceptKeyaddHTTPInterceptor, closeAllConnections, createServerRunnable, decodeParameters, decodeParameters, decodePercent, getHostname, getListeningPort, getMimeTypeForFile, getMyServerSocket, getServerSocketFactory, getTempFileManagerFactory, handle, isAlive, makeSecure, makeSSLSocketFactory, makeSSLSocketFactory, makeSSLSocketFactory, mimeTypes, safeClose, setAsyncRunner, setHTTPHandler, setServerSocketFactory, setTempFileManagerFactory, start, start, start, wasStartedpublic static InspectorServer get(InetSocketAddress isa, Token token, String pathContainingToken, InspectorExecutionContext context, boolean debugBrk, boolean secure, KeyStoreOptions keyStoreOptions, ConnectionWatcher connectionWatcher, InspectServerSession initialSession) throws IOException
IOExceptionprotected org.nanohttpd.protocols.websockets.WebSocket openWebSocket(org.nanohttpd.protocols.http.IHTTPSession handshake)
openWebSocket in class org.nanohttpd.protocols.websockets.NanoWSDprotected org.nanohttpd.protocols.http.ClientHandler createClientHandler(Socket finalAccept, InputStream inputStream)
createClientHandler in class org.nanohttpd.protocols.http.NanoHTTPDpublic int getPort()
getPort in interface InspectorWSConnectionpublic void close(Token token) throws IOException
ConnectionWatcher.waitForClose() is done.close in interface InspectorWSConnectionIOExceptionpublic void consoleAPICall(Token token, String type, Object text)
consoleAPICall in interface InspectorWSConnectionpublic void stop()
stop in class org.nanohttpd.protocols.http.NanoHTTPD