Interface FileServiceConfig

All Superinterfaces:
Config

public interface FileServiceConfig extends Config
Web Server - File Service Configuration.

This is an optional object for a Web Server, that is a Web Server may or may not have a file service configured.

No values can be changed after the server has been started.

Since:
4.4
  • Method Details

    • getName

      String getName()
      Gets the file service name.
      Returns:
      file service name
    • getVirtualHosts

      List<VirtualHostConfig> getVirtualHosts()
      Get Virtual Hosts configured.
      Returns:
      list of virtual hosts which can be empty if none configured.
    • getVirtualHost

      VirtualHostConfig getVirtualHost(String name)
      Get a named virtual host configuration.
      Parameters:
      name - the virtual host name
      Returns:
      the configuration or null if none exists for name
    • addVirtualHost

      VirtualHostConfig addVirtualHost(String name, String host, String documentRoot, String homePage) throws ConfigException
      Add a new virtual host configuration.
      Parameters:
      name - virtual host name
      host - Specify the host of which the virtual host is to serve, i.e. download.pushtechnology.com or * for all
      documentRoot - This is the physical directory for this virtual host
      homePage - This sets the default home page which is used with directory browsing.
      Returns:
      virtual host configuration
      Throws:
      ConfigException - if unable to ad virtual host
    • removeVirtualHost

      VirtualHostConfig removeVirtualHost(String name) throws ConfigException
      Remove virtual host.
      Parameters:
      name - the name of the host to remove
      Returns:
      the host or null if it did not exist
      Throws:
      ConfigException - if unable to remove
    • setWriteTimeout

      void setWriteTimeout(long timeout) throws ConfigException
      Sets the write timeout.

      Write timeout for serving files. This does not affect HTTP clients.

      If not explicitly specified, 3 seconds is assumed.

      Parameters:
      timeout - in milliseconds
      Throws:
      ConfigException - if unable to set write timeout
    • getWriteTimeout

      long getWriteTimeout()
      Gets the write timeout value.
      Returns:
      write timeout