|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ikrs.httpd.AbstractFileHandler
public abstract class AbstractFileHandler
This is a general abstract FileHandler implementation. Classes implementing the FileHandler interface should extend this class.
Constructor Summary | |
---|---|
AbstractFileHandler()
The file handler class usually is instantiated using the Class.newInstance() method. |
Method Summary | |
---|---|
HTTPHandler |
getHTTPHandler()
Get get FileHandler's global HTTPHandler. |
CustomLogger |
getLogger()
Get the custom logger to use to write log messages. |
abstract Resource |
process(java.util.UUID sessionID,
HTTPHeaders headers,
PostDataWrapper postData,
java.io.File file,
java.net.URI requestURI)
The 'process' method is very generic. |
abstract boolean |
requiresExistingFile()
Most file handlers operate on existing files that are located inside the local file system (such as the default handler does for simple file delivery). |
void |
setHTTPHandler(HTTPHandler handler)
Set the global HTTP handler. |
void |
setLogger(CustomLogger logger)
Set the logger to use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractFileHandler() throws java.lang.NullPointerException
java.lang.NullPointerException
Method Detail |
---|
public HTTPHandler getHTTPHandler()
getHTTPHandler
in interface FileHandler
public void setHTTPHandler(HTTPHandler handler) throws java.lang.NullPointerException
setHTTPHandler
in interface FileHandler
handler
- The new handler (must not be null).
java.lang.NullPointerException
- If handler is null.public CustomLogger getLogger()
getLogger
in interface FileHandler
public void setLogger(CustomLogger logger) throws java.lang.NullPointerException
setLogger
in interface FileHandler
logger
- The new logger (must not be null).
java.lang.NullPointerException
- If logger is null.public abstract boolean requiresExistingFile()
requiresExistingFile
in interface FileHandler
public abstract Resource process(java.util.UUID sessionID, HTTPHeaders headers, PostDataWrapper postData, java.io.File file, java.net.URI requestURI) throws java.io.IOException, HeaderFormatException, DataFormatException, UnsupportedFormatException
process
in interface FileHandler
sessionID
- The current session's ID.headers
- The HTTP request headers.postData
- The HTTP post data; if the method is not HTTP POST the 'postData' should be null
(or empty).file
- The requested file itself (inside the local file system).requestURI
- The requested URI (relative to DOCUMENT_ROOT).
java.io.IOException
HeaderFormatException
DataFormatException
UnsupportedFormatException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |