public abstract class NanoHTTPD extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
NanoHTTPD.AsyncRunner |
class |
NanoHTTPD.ClientHandler |
static class |
NanoHTTPD.Cookie |
class |
NanoHTTPD.CookieHandler |
static class |
NanoHTTPD.DefaultAsyncRunner |
static class |
NanoHTTPD.DefaultServerSocketFactory |
static class |
NanoHTTPD.DefaultTempFile |
static class |
NanoHTTPD.DefaultTempFileManager |
protected class |
NanoHTTPD.DefaultTempFileManagerFactory |
protected class |
NanoHTTPD.HTTPSession |
static interface |
NanoHTTPD.IHTTPSession |
static class |
NanoHTTPD.Method |
static class |
NanoHTTPD.Response |
static class |
NanoHTTPD.ResponseException |
static class |
NanoHTTPD.SecureServerSocketFactory |
class |
NanoHTTPD.ServerRunnable |
static interface |
NanoHTTPD.ServerSocketFactory |
static interface |
NanoHTTPD.TempFile |
static interface |
NanoHTTPD.TempFileManager |
static interface |
NanoHTTPD.TempFileManagerFactory |
Modifier and Type | Field and Description |
---|---|
protected NanoHTTPD.AsyncRunner |
asyncRunner |
static Pattern |
BOUNDARY_PATTERN |
protected static String |
BOUNDARY_REGEX |
static Pattern |
CHARSET_PATTERN |
protected static String |
CHARSET_REGEX |
protected static Pattern |
CONTENT_DISPOSITION_ATTRIBUTE_PATTERN |
protected static String |
CONTENT_DISPOSITION_ATTRIBUTE_REGEX |
protected static Pattern |
CONTENT_DISPOSITION_PATTERN |
protected static String |
CONTENT_DISPOSITION_REGEX |
protected static Pattern |
CONTENT_TYPE_PATTERN |
protected static String |
CONTENT_TYPE_REGEX |
protected String |
hostname |
protected static Logger |
LOG |
static String |
MIME_HTML |
static String |
MIME_PLAINTEXT |
protected static Map<String,String> |
MIME_TYPES |
protected int |
myPort |
protected ServerSocket |
myServerSocket |
protected Thread |
myThread |
protected static String |
QUERY_STRING_PARAMETER |
protected NanoHTTPD.ServerSocketFactory |
serverSocketFactory |
static int |
SOCKET_READ_TIMEOUT |
protected NanoHTTPD.TempFileManagerFactory |
tempFileManagerFactory |
Constructor and Description |
---|
NanoHTTPD(int port) |
NanoHTTPD(String hostname,
int port) |
public static final int SOCKET_READ_TIMEOUT
public static final String MIME_PLAINTEXT
public static final String MIME_HTML
protected static final String CHARSET_REGEX
public static final Pattern CHARSET_PATTERN
protected static final String BOUNDARY_REGEX
public static final Pattern BOUNDARY_PATTERN
protected static final String CONTENT_DISPOSITION_REGEX
protected static final Pattern CONTENT_DISPOSITION_PATTERN
protected static final String CONTENT_TYPE_REGEX
protected static final Pattern CONTENT_TYPE_PATTERN
protected static final String CONTENT_DISPOSITION_ATTRIBUTE_REGEX
protected static final Pattern CONTENT_DISPOSITION_ATTRIBUTE_PATTERN
protected static final String QUERY_STRING_PARAMETER
protected static final Logger LOG
protected final String hostname
protected final int myPort
protected volatile ServerSocket myServerSocket
protected NanoHTTPD.ServerSocketFactory serverSocketFactory
protected Thread myThread
protected NanoHTTPD.AsyncRunner asyncRunner
protected NanoHTTPD.TempFileManagerFactory tempFileManagerFactory
public NanoHTTPD(int port)
public NanoHTTPD(String hostname, int port)
public static SSLServerSocketFactory makeSSLSocketFactory(KeyStore loadedKeyStore, KeyManager[] keyManagers) throws IOException
IOException
public static SSLServerSocketFactory makeSSLSocketFactory(KeyStore loadedKeyStore, KeyManagerFactory loadedKeyFactory) throws IOException
IOException
public static SSLServerSocketFactory makeSSLSocketFactory(String keyAndTrustStoreClasspathPath, char[] passphrase) throws IOException
IOException
protected static final void safeClose(Object closeable)
protected static Map<String,List<String>> decodeParameters(Map<String,String> parms)
public static NanoHTTPD.Response newChunkedResponse(NanoHTTPD.Response.IStatus status, String mimeType, InputStream data)
public static NanoHTTPD.Response newFixedLengthResponse(NanoHTTPD.Response.IStatus status, String mimeType, InputStream data, long totalBytes)
public static NanoHTTPD.Response newFixedLengthResponse(NanoHTTPD.Response.IStatus status, String mimeType, String txt)
public static NanoHTTPD.Response newFixedLengthResponse(String msg)
public void closeAllConnections()
protected NanoHTTPD.ClientHandler createClientHandler(Socket finalAccept, InputStream inputStream)
protected NanoHTTPD.ServerRunnable createServerRunnable(int timeout)
protected boolean useGzipWhenAccepted(NanoHTTPD.Response r)
public final int getListeningPort()
public final boolean isAlive()
public NanoHTTPD.ServerSocketFactory getServerSocketFactory()
public void setServerSocketFactory(NanoHTTPD.ServerSocketFactory serverSocketFactory)
public String getHostname()
public NanoHTTPD.TempFileManagerFactory getTempFileManagerFactory()
public void setTempFileManagerFactory(NanoHTTPD.TempFileManagerFactory tempFileManagerFactory)
public void makeSecure(SSLServerSocketFactory sslServerSocketFactory, String[] sslProtocols)
public NanoHTTPD.Response serve(NanoHTTPD.IHTTPSession session)
@Deprecated public NanoHTTPD.Response serve(String uri, NanoHTTPD.Method method, Map<String,String> headers, Map<String,String> parms, Map<String,String> files)
public void setAsyncRunner(NanoHTTPD.AsyncRunner asyncRunner)
public void start() throws IOException
IOException
public void start(int timeout) throws IOException
IOException
public void start(int timeout, boolean daemon) throws IOException
IOException
public void stop()
public final boolean wasStarted()
Copyright © 2019 SimiaCryptus Software. All rights reserved.