public class HTTPServicesRegistry extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
HTTPServicesRegistry.ServicesMapHolder
Holds both serviceByBasePath map and sorted Service basePath list.
|
Modifier and Type | Field and Description |
---|---|
protected Map<String,HttpService> |
servicesByBasePath |
protected Map<String,HTTPServicesRegistry.ServicesMapHolder> |
servicesMapByHost |
protected List<String> |
sortedServiceURIs |
Constructor and Description |
---|
HTTPServicesRegistry(WebSocketServicesRegistry webSocketServicesRegistry) |
Modifier and Type | Method and Description |
---|---|
String |
findTheMostSpecificBasePath(String requestURIPath,
Map<String,HttpService> services,
List<String> sortedServiceURIs) |
HttpService |
getServiceInfo(String basepath)
Get ServiceInfo instance for given interface and base path.
|
Map<String,HttpService> |
getServicesByHost(String hostName)
Get Services map for given host name.
|
HTTPServicesRegistry.ServicesMapHolder |
getServicesMapHolder(String hostName)
Get ServicesMapHolder for given host name.
|
List<String> |
getSortedServiceURIsByHost(String hostName)
Get sortedServiceURIs list for given host name.
|
void |
registerService(Service service)
Register a service into the map.
|
protected Map<String,HTTPServicesRegistry.ServicesMapHolder> servicesMapByHost
protected Map<String,HttpService> servicesByBasePath
public HTTPServicesRegistry(WebSocketServicesRegistry webSocketServicesRegistry)
public HttpService getServiceInfo(String basepath)
basepath
- basePath of the service.HttpService
instance if exist else nullpublic HTTPServicesRegistry.ServicesMapHolder getServicesMapHolder(String hostName)
hostName
- of the servicepublic Map<String,HttpService> getServicesByHost(String hostName)
hostName
- of the servicepublic List<String> getSortedServiceURIsByHost(String hostName)
hostName
- of the servicepublic void registerService(Service service)
service
- requested serviceInfo to be registered.Copyright © 2018 WSO2. All rights reserved.