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.PlaceholderDirectory
m_DocumentRoot
the document root.protected boolean
m_ListDirectories
whether to list directories.protected adams.core.base.BaseString[]
m_WelcomeFiles
the 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.Handler
configureHandler()
Configures the handler.void
defineOptions()
Adds options to the internal list of options.String
documentRootTipText()
Returns the tip text for this property.adams.core.io.PlaceholderDirectory
getDocumentRoot()
Returns the directory with the static files.boolean
getListDirectories()
Returns whether directories are listed.adams.core.base.BaseString[]
getWelcomeFiles()
Returns the files to serve automatically if URL does not list file.String
globalInfo()
Returns a string describing the object.String
listDirectoriesTipText()
Returns the tip text for this property.void
setDocumentRoot(adams.core.io.PlaceholderDirectory value)
Sets the directory with the static files.void
setListDirectories(boolean value)
Sets whether to list directories.void
setWelcomeFiles(adams.core.base.BaseString[] value)
Sets the files to serve automatically if URL does not list file.String
welcomeFilesTipText()
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:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in 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:
configureHandler
in interfaceHandler
- Specified by:
configureHandler
in classAbstractHandler
- Returns:
- the configured handler
-
-