public interface WebServerConfig extends 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.
Modifier and Type | Method and Description |
---|---|
HTTPServiceConfig |
addHTTPService(String name,
String className,
String urlPattern)
Add an HTTP Service.
|
ClientServiceConfig |
getClientService()
Get Client Service configuration.
|
FileServiceConfig |
getFileService()
Get file service configuration.
|
HTTPServiceConfig |
getHTTPService(String name)
Get named HTTP Service configuration.
|
List<HTTPServiceConfig> |
getHTTPServices()
Get list of HTTP Service configurations.
|
String |
getName()
Gets the Web Server name.
|
ClientServiceConfig |
removeClientService()
Remove Client Service.
|
FileServiceConfig |
removeFileService()
Remove File Service.
|
HTTPServiceConfig |
removeHTTPService(String name)
Remove a named HTTP Service.
|
ClientServiceConfig |
setClientService(String name)
Add a client service.
|
FileServiceConfig |
setFileService(String name)
Add a file service.
|
String getName()
ClientServiceConfig getClientService()
There can only be a maximum of one Client Service.
ClientServiceConfig setClientService(String name) throws ConfigException
This may be used to add the one and only Client Service.
name
- a name for the client serviceConfigException
- if unable to add a client service, possibly
because one already exists.ClientServiceConfig removeClientService() throws ConfigException
ConfigException
- if unable to removeList<HTTPServiceConfig> getHTTPServices()
HTTPServiceConfig getHTTPService(String name)
name
- the service nameHTTPServiceConfig addHTTPService(String name, String className, String urlPattern) throws ConfigException
Any number of HTTP services may be added.
name
- HTTP service nameclassName
- 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.ConfigException
- if unable to add HTTP serviceHTTPServiceConfig removeHTTPService(String name) throws ConfigException
name
- service nameConfigException
- if unable to removeFileServiceConfig getFileService()
There can only be a maximum of one file service.
FileServiceConfig setFileService(String name) throws ConfigException
There may only be one file service so this will fail if one is already defined.
name
- a name for the serviceConfigException
- if unable to add file serviceFileServiceConfig removeFileService() throws ConfigException
ConfigException
- if unable to removeCopyright © 2021 Push Technology Ltd. All Rights Reserved.