| java.lang.Object net.homeip.donaldm.httpdbase4j.Httpd net.homeip.donaldm.httpdbase4j.ArchiveHttpd
ArchiveHttpd | public class ArchiveHttpd extends Httpd implements HttpHandleable,Postable(Code) | | Implementation of the abstract Httpd class for web content in a
jar in the classpath or in an archive.
See Also: Httpd See Also: author: Donald Munro |
Constructor Summary | |
public | ArchiveHttpd(String homeDir) Constructor with a home resource location. | public | ArchiveHttpd(java.io.File archiveFile, String archiveDirName) Constructor with a jar file containing the resources and a home resource location
within the jar.
Parameters: archiveFile - A content jar, zip, tar, tar.gz or tar.bz2 file containing directory homeDir. | public | ArchiveHttpd(String archiveDirName, ThreadModel threadModel) Constructor with a home resource location and a thread model. | public | ArchiveHttpd(java.io.File archiveFile, String archiveDirName, ThreadModel threadModel) | public | ArchiveHttpd(String archiveDirName, int poolSize) Constructor for a fixed size thread pool based server. | public | ArchiveHttpd(String archiveDirName, int poolSize, int maxPoolSize) Constructor for a thread pool based server. | public | ArchiveHttpd(java.io.File archiveFile, String archiveDirName, int poolSize, int maxPoolSize) Constructor for a thread pool based server. |
m_archiveDirectory | protected File m_archiveDirectory(Code) | | Compressed file containing web content. Prefarably jar but can also be
zip, tar, tar.gz or tar.bz2
|
ArchiveHttpd | public ArchiveHttpd(String homeDir) throws FileNotFoundException(Code) | | Constructor with a home resource location. Assumes the content is in a jar
in the classpath and will search the classpath to attempt to find the jar.
Parameters: homeDir - The base directory in the jar where content is located throws: java.io.FileNotFoundException - |
ArchiveHttpd | public ArchiveHttpd(java.io.File archiveFile, String archiveDirName) throws FileNotFoundException(Code) | | Constructor with a jar file containing the resources and a home resource location
within the jar.
Parameters: archiveFile - A content jar, zip, tar, tar.gz or tar.bz2 file containing directory homeDir. Parameters: archiveDirName - The base directory in the content compressed file where content is located throws: java.io.FileNotFoundException - |
ArchiveHttpd | public ArchiveHttpd(String archiveDirName, ThreadModel threadModel) throws FileNotFoundException(Code) | | Constructor with a home resource location and a thread model. Assumes the content is in a jar
in the classpath and will search the classpath to attempt to find the jar.
Parameters: archiveDirName - The base directory in the jar where content is located Parameters: threadModel - The thread model to use (SINGLE, MULTI or POOL) |
ArchiveHttpd | public ArchiveHttpd(java.io.File archiveFile, String archiveDirName, ThreadModel threadModel) throws FileNotFoundException(Code) | | Constructor with a jar file, home resource location and a thread model
Parameters: archiveFile - A content Jar file containing directory homeDir. Parameters: archiveDirName - The base directory in the jar where content is located Parameters: threadModel - The thread model to use (SINGLE, MULTI or POOL) throws: java.io.FileNotFoundException - |
ArchiveHttpd | public ArchiveHttpd(String archiveDirName, int poolSize) throws FileNotFoundException(Code) | | Constructor for a fixed size thread pool based server. Assumes the content is in a jar
in the classpath and will search the classpath to attempt to find the jar.
Parameters: archiveDirName - The base directory in the jar where content is located Parameters: poolSize - Size of the thread pool |
ArchiveHttpd | public ArchiveHttpd(String archiveDirName, int poolSize, int maxPoolSize) throws FileNotFoundException(Code) | | Constructor for a thread pool based server. Assumes the content is in a jar
in the classpath and will search the classpath to attempt to find the jar.
Parameters: archiveDirName - The base directory in the jar where content is located Parameters: poolSize - Size of the thread pool Parameters: maxPoolSize - Maximum Size of the thread pool |
ArchiveHttpd | public ArchiveHttpd(java.io.File archiveFile, String archiveDirName, int poolSize, int maxPoolSize) throws FileNotFoundException(Code) | | Constructor for a thread pool based server.
Parameters: archiveFile - A content Jar file containing directory homeDir. Parameters: archiveDirName - The base directory in the jar where content is located Parameters: poolSize - Size of the thread pool Parameters: maxPoolSize - Maximum Size of the thread pool throws: java.io.FileNotFoundException - |
getArchiveDirectoryName | public String getArchiveDirectoryName()(Code) | | Get the directory within the archive for the base content.
The directory within the archive for the base content. |
getArchiveFile | public java.io.File getArchiveFile()(Code) | | Get the archive file for the base content.
The archive file for the base content. |
getArchiveFileName | public String getArchiveFileName()(Code) | | Get the archive file for the base content.
The archive file name for the base content. |
isInClassPath | public static boolean isInClassPath(String jarFileName)(Code) | | |
onCreateRequestHandler | protected HttpHandler onCreateRequestHandler()(Code) | | |
Methods inherited from net.homeip.donaldm.httpdbase4j.Httpd | protected static void Log(LogLevel level, String message, Throwable e)(Code)(Java Doc) public void addDefaultFile(String file)(Code)(Java Doc) public void addHandler(String extension, HttpHandleable handler)(Code)(Java Doc) public void addPostHandler(String name, Postable handler)(Code)(Java Doc) public boolean getCaching()(Code)(Java Doc) public HttpHandleable getHandler(String extension)(Code)(Java Doc) abstract public String getHomePath()(Code)(Java Doc) public static long getNextSequence()(Code)(Java Doc) public int getPort()(Code)(Java Doc) public boolean getVerbose()(Code)(Java Doc) public boolean isStarted()(Code)(Java Doc) public boolean onAllowDirectoryBrowse(String directory)(Code)(Java Doc) protected ExecutorService onCreateExecutor() throws NoSuchFieldException(Code)(Java Doc) abstract protected HttpHandler onCreateRequestHandler()(Code)(Java Doc) protected SSLContext onCreateSSLConfiguration(String keystore, String password) throws NoSuchAlgorithmException, KeyStoreException, FileNotFoundException, IOException, CertificateException, UnrecoverableKeyException, KeyManagementException(Code)(Java Doc) public Request onFileNotFound(long id, HttpExchange ex, Request request)(Code)(Java Doc) public java.io.File onGetCachedFile(long id, HttpExchange ex, Request request)(Code)(Java Doc) public Object onHandlePost(long id, HttpExchange ex, Request request, HttpResponse response, java.io.File dir, Object... extraParameters)(Code)(Java Doc) public boolean onIsCacheable(long id, HttpExchange ex, Request request)(Code)(Java Doc) public String onListDirectory(Request request)(Code)(Java Doc) public void onPostServe(long id, HttpExchange ex, Request request, boolean isOK)(Code)(Java Doc) public boolean onPreServe(long id, HttpExchange ex, Request request)(Code)(Java Doc) public InputStream onServeBody(long id, HttpExchange ex, Request request)(Code)(Java Doc) public HttpResponse onServeHeaders(long id, HttpExchange ex, Request request)(Code)(Java Doc) protected void onSetSSLParameters(SSLContext c, HttpsParameters params)(Code)(Java Doc) public HttpHandleable removeHandler(String extension)(Code)(Java Doc) public Postable removePostHandler(String name)(Code)(Java Doc) public void setAuthenticator(Authenticator authenticator)(Code)(Java Doc) public void setCaching(boolean b)(Code)(Java Doc) protected void setDefaultPoolSizes()(Code)(Java Doc) public boolean setLogger(Object ologger)(Code)(Java Doc) public void setThreadModel(ThreadModel threadModel)(Code)(Java Doc) public void setThreadPool(int size)(Code)(Java Doc) public void setThreadPool(int size, int max)(Code)(Java Doc) public void setVerbose(boolean b)(Code)(Java Doc) public boolean start(int port, String root) throws IOException, NoSuchFieldException(Code)(Java Doc) public boolean start(int port, String root, Authenticator authenticator) throws IOException, NoSuchFieldException(Code)(Java Doc) public boolean start(int port, String root, String keystore, String password) throws KeyStoreException, NoSuchAlgorithmException, CertificateException, UnrecoverableKeyException, KeyManagementException, NoSuchFieldException, FileNotFoundException, IOException(Code)(Java Doc) public boolean start(int port, String root, Authenticator authenticator, String keystore, String password) throws KeyStoreException, NoSuchAlgorithmException, CertificateException, UnrecoverableKeyException, KeyManagementException, NoSuchFieldException, FileNotFoundException, IOException(Code)(Java Doc) public boolean stop(int timeout)(Code)(Java Doc)
|
|
|