Interface WebServerConfig
- All Superinterfaces:
- Config
 A Diffusion server can have any number of Web Server configurations that can
 be used by Connectors. A Connector that specifies a
 Web Server configuration itself effectively becomes a Web Server.
 
 A Web Server and any associated file service will
 only be visible when associated with a connector.
 
 A Web Server configuration can define:
 1) An optional Client Service to serve Diffusion Client connections over
 HTTP. 
 2) An optional File Service to serve static file requests. 
 3) Any number of user defined HTTP Services.
 4) Any number of user defined REST Services.
- Since:
- 4.4
- 
Method SummaryModifier and TypeMethodDescriptionaddHTTPService(String name, String className, String urlPattern) Add an HTTP Service.Get Client Service configuration.Get file service configuration.getHTTPService(String name) Get named HTTP Service configuration.Get list of HTTP Service configurations.getName()Gets the Web Server name.GetRestServiceConfigdefined for this web server config.Remove Client Service.Remove File Service.removeHTTPService(String name) Remove a named HTTP Service.voidRemoves instance ofRestServiceConfig.setClientService(String name) Add a client service.setFileService(String name) Add a file service.AddsRestServiceConfigfor this web server config.
- 
Method Details- 
getNameString getName()Gets the Web Server name.- Returns:
- web server name
 
- 
getClientServiceClientServiceConfig getClientService()Get Client Service configuration.There can only be a maximum of one Client Service. - Returns:
- client service configuration or null if one has not been defined.
 
- 
setClientServiceAdd a client service.This may be used to add the one and only Client Service. - Parameters:
- name- a name for the client service
- Returns:
- client service configuration
- Throws:
- ConfigException- if unable to add a client service, possibly because one already exists.
 
- 
removeClientServiceRemove Client Service.- Returns:
- service config or null if no such service existed
- Throws:
- ConfigException- if unable to remove
 
- 
getHTTPServicesList<HTTPServiceConfig> getHTTPServices()Get list of HTTP Service configurations.- Returns:
- list of HTTP service configurations which may be empty if none have been defined.
 
- 
getHTTPServiceGet named HTTP Service configuration.- Parameters:
- name- the service name
- Returns:
- the service configuration or null if not defined
 
- 
addHTTPServiceHTTPServiceConfig addHTTPService(String name, String className, String urlPattern) throws ConfigException Add an HTTP Service.Any number of HTTP services may be added. - Parameters:
- name- HTTP service name
- className- the service class name. This must represent a class that implements the HTTPServiceHandler interface.
- urlPattern- The pattern that the URL must match for this service to be invoked.
- Returns:
- HTTP Service configuration.
- Throws:
- ConfigException- if unable to add HTTP service
 
- 
removeHTTPServiceRemove a named HTTP Service.- Parameters:
- name- service name
- Returns:
- service config or null if no such service existed
- Throws:
- ConfigException- if unable to remove
 
- 
getFileServiceFileServiceConfig getFileService()Get file service configuration.There can only be a maximum of one file service. - Returns:
- file service configuration or null if not defined.
 
- 
setFileServiceAdd a file service.There may only be one file service so this will fail if one is already defined. - Parameters:
- name- a name for the service
- Returns:
- file service configuration
- Throws:
- ConfigException- if unable to add file service
 
- 
removeFileServiceRemove File Service.- Returns:
- service config or null if no such service existed
- Throws:
- ConfigException- if unable to remove
 
- 
getRestServiceConfigRestServiceConfig getRestServiceConfig()GetRestServiceConfigdefined for this web server config.- Returns:
- the REST service configuration or null if not defined
 
- 
setRestServiceConfigAddsRestServiceConfigfor this web server config.- Returns:
- REST service config instance
- Throws:
- ConfigException- if unable to add
 
- 
removeRestServiceConfigRemoves instance ofRestServiceConfig.- Throws:
- ConfigException- if fails to remove
 
 
-