pygmy.handlers
Class DirectoryHandler
java.lang.Object
pygmy.core.AbstractHandler
pygmy.handlers.DirectoryHandler
- All Implemented Interfaces:
- Handler
public class DirectoryHandler
- extends AbstractHandler
- implements Handler
This sends back a directory listing in html text. The look and feel is
customizable through a cascading style sheet to use. The directory listing
is ordered by DirectoryHandler.ComparableComparator
. The referenced
classes in the CSS are:
- .navigationbar
- .box
- tr.tableheader
- tr.fileentry
- tr.altfileentry
- a.whitelink
- directory
- topHeader
- nameColumn
- typeColumn
- sizeColumn
url-prefix | The prefix to filter request urls. | None | Yes |
root | A local system path to the root of the folder to share. | None | Yes |
css | The name stylesheet to use for customizing the style of the display. If unspecified a default style will be inlined in the HTML. | None | No |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ROOT_OPTION
public static final ConfigOption ROOT_OPTION
CSS_OPTION
public static final ConfigOption CSS_OPTION
DirectoryHandler
public DirectoryHandler()
initialize
public boolean initialize(java.lang.String handlerName,
Server server)
- Specified by:
initialize
in interface Handler
- Overrides:
initialize
in class AbstractHandler
handleBody
protected boolean handleBody(HttpRequest request,
HttpResponse response)
throws java.io.IOException
- Overrides:
handleBody
in class AbstractHandler
- Throws:
java.io.IOException