Interface FileServiceConfig
- All Superinterfaces:
- 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 SummaryModifier and TypeMethodDescriptionaddVirtualHost(String name, String host, String documentRoot, String homePage) Add a new virtual host configuration.getName()Gets the file service name.getVirtualHost(String name) Get a named virtual host configuration.Get Virtual Hosts configured.longGets the write timeout value.removeVirtualHost(String name) Remove virtual host.voidsetWriteTimeout(long timeout) Sets the write timeout.
- 
Method Details- 
getNameString getName()Gets the file service name.- Returns:
- file service name
 
- 
getVirtualHostsList<VirtualHostConfig> getVirtualHosts()Get Virtual Hosts configured.- Returns:
- list of virtual hosts which can be empty if none configured.
 
- 
getVirtualHostGet a named virtual host configuration.- Parameters:
- name- the virtual host name
- Returns:
- the configuration or null if none exists for name
 
- 
addVirtualHostVirtualHostConfig 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
 
- 
removeVirtualHostRemove 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
 
- 
setWriteTimeoutSets 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
 
- 
getWriteTimeoutlong getWriteTimeout()Gets the write timeout value.- Returns:
- write timeout
 
 
-