Class 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
    Configurable ResourceHandler.
    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).
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • 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
      • Methods inherited from interface adams.core.Destroyable

        destroy
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel
      • Methods inherited from interface adams.core.option.OptionHandler

        cleanUpOptions, getOptionManager, toCommandLine
    • Field Detail

      • m_DocumentRoot

        protected adams.core.io.PlaceholderDirectory m_DocumentRoot
        the document root.
      • m_WelcomeFiles

        protected adams.core.base.BaseString[] m_WelcomeFiles
        the welcome files (no path).
      • m_ListDirectories

        protected boolean m_ListDirectories
        whether to list directories.
    • Constructor Detail

      • ResourceHandler

        public ResourceHandler()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class AbstractHandler
        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 interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class adams.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.