Package adams.flow.standalone.webserver
Class ResourceHandler
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.standalone.webserver.AbstractHandler
-
- adams.flow.standalone.webserver.ResourceHandler
-
- All Implemented Interfaces:
adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.SizeOfHandler,Handler,Serializable
public class ResourceHandler extends AbstractHandler
ConfigurableResourceHandler.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.core.io.PlaceholderDirectorym_DocumentRootthe document root.protected booleanm_ListDirectorieswhether to list directories.protected adams.core.base.BaseString[]m_WelcomeFilesthe welcome files (no path).
-
Constructor Summary
Constructors Constructor Description ResourceHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.jetty.server.HandlerconfigureHandler()Configures the handler.voiddefineOptions()Adds options to the internal list of options.StringdocumentRootTipText()Returns the tip text for this property.adams.core.io.PlaceholderDirectorygetDocumentRoot()Returns the directory with the static files.booleangetListDirectories()Returns whether directories are listed.adams.core.base.BaseString[]getWelcomeFiles()Returns the files to serve automatically if URL does not list file.StringglobalInfo()Returns a string describing the object.StringlistDirectoriesTipText()Returns the tip text for this property.voidsetDocumentRoot(adams.core.io.PlaceholderDirectory value)Sets the directory with the static files.voidsetListDirectories(boolean value)Sets whether to list directories.voidsetWelcomeFiles(adams.core.base.BaseString[] value)Sets the files to serve automatically if URL does not list file.StringwelcomeFilesTipText()Returns the tip text for this property.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin classAbstractHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classadams.core.option.AbstractOptionHandler
-
setDocumentRoot
public void setDocumentRoot(adams.core.io.PlaceholderDirectory value)
Sets the directory with the static files.- Parameters:
value- the dir
-
getDocumentRoot
public adams.core.io.PlaceholderDirectory getDocumentRoot()
Returns the directory with the static files.- Returns:
- the dir
-
documentRootTipText
public String documentRootTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setWelcomeFiles
public void setWelcomeFiles(adams.core.base.BaseString[] value)
Sets the files to serve automatically if URL does not list file.- Parameters:
value- the files (without path)
-
getWelcomeFiles
public adams.core.base.BaseString[] getWelcomeFiles()
Returns the files to serve automatically if URL does not list file.- Returns:
- the files (without path)
-
welcomeFilesTipText
public String welcomeFilesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setListDirectories
public void setListDirectories(boolean value)
Sets whether to list directories.- Parameters:
value- if true then directories are listed
-
getListDirectories
public boolean getListDirectories()
Returns whether directories are listed.- Returns:
- true if direcories are listed
-
listDirectoriesTipText
public String listDirectoriesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
configureHandler
public org.eclipse.jetty.server.Handler configureHandler()
Configures the handler.- Specified by:
configureHandlerin interfaceHandler- Specified by:
configureHandlerin classAbstractHandler- Returns:
- the configured handler
-
-