|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wso2.carbon.url.mapper.internal.util.HostUtil
public class HostUtil
util class which is doing add host to engine and getting resources from the registry.
| Constructor Summary | |
|---|---|
HostUtil()
|
|
| Method Summary | |
|---|---|
static void |
addDomainToServiceEpr(String hostName,
String url,
String appType)
adding domain for service in registry |
static org.apache.catalina.Host |
addHostToEngine(String hostName)
add host to engine. |
static void |
addServiceMapping(String epr)
add the service mapping when an actual service got deleted. |
static void |
addServiceParameter(String url)
|
static void |
addServiceUrlMapping(int tenantId,
String serviceName)
|
static void |
addWebAppToHost(String hostName,
String uri,
String appType)
It is taken the webApp which is already deployed in /repository/../webapps and redeploy it within added virtual host. |
static void |
deleteHostDirectory(String hostName)
edit the host from CATALINA-HOME directory |
static void |
deleteResourceToRegistry(String host)
deleting resource in registry when deleting host |
static void |
deleteServiceMapping(String epr)
edit the service mapping when an actual service got deleted. |
static void |
editHostInEngine(String webAppName,
String newHost,
String oldHost)
delete the existing host with the given name |
static MappingData[] |
getAllMappingsFromRegistry()
|
static String |
getApplicationContextForHost(String hostName)
retrieving host for a specific service |
static String |
getContextFromUri(String uri)
getting context of the webapp from the uri |
static String |
getHttpPort()
|
static List<String> |
getMappingsPerEppr(String url)
This method is used to retrieve list of host names for a given webapplication. |
static List<String> |
getMappingsPerWebApp(String webAppName)
This method is used to retrieve list of host names for a given webapplication. |
static String |
getServiceEndpoint(String url)
getting service endpoint from url |
static String |
getServiceName(String serviceContext)
|
static String |
getServiceNameForHost(String hostName)
retrieving host for a specific service |
static String |
getTenantDomainFromTID(int tenantId)
|
static MappingData[] |
getTenantSpecificMappingsFromRegistry(String tenantName)
|
static String |
getUrlSuffix()
|
static String |
getWebappPath(String webappsDir,
String uri,
String appType)
|
static boolean |
isMappingExist(String mappingName)
Find out whether the hostname exists already |
static boolean |
isMappingLimitExceeded(String webAppName)
This method is used to check if the maximum no of mappings are exceeded webapplication. |
static boolean |
isServiceURLPattern(String url)
checking for the pattern of the url for service |
static void |
removeHost(String hostName)
remove the host from the engine and registry |
static void |
removeHostForCluster(String hostName)
|
static void |
removeServiceMapping(String epr)
remove the service mapping when an actual service got deleted. |
static void |
removeUrlMappingFromMap(int tenantId,
String serviceName)
|
static void |
setUrlSuffix(String urlSuffix)
|
static void |
updateEprToRegistry(String newHost,
String oldHost)
update endpoint in the registry for host |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HostUtil()
| Method Detail |
|---|
public static List<String> getMappingsPerWebApp(String webAppName)
throws UrlMapperException
webAppName - the webapp name
UrlMapperException - throws it when failing to get resource from registry
public static boolean isMappingLimitExceeded(String webAppName)
throws UrlMapperException
webAppName - the webapp name
UrlMapperException - throws it when failing to get resource from registry
public static boolean isMappingExist(String mappingName)
throws UrlMapperException
mappingName - the host name to be mapped
UrlMapperException - throws when error while retrieve from registry
public static MappingData[] getAllMappingsFromRegistry()
throws UrlMapperException
UrlMapperException
public static MappingData[] getTenantSpecificMappingsFromRegistry(String tenantName)
throws UrlMapperException
UrlMapperException
public static List<String> getMappingsPerEppr(String url)
throws UrlMapperException
url -
UrlMapperException
public static String getServiceNameForHost(String hostName)
throws UrlMapperException
hostName - name of the host
UrlMapperException
public static String getApplicationContextForHost(String hostName)
throws UrlMapperException
hostName - name of the host
UrlMapperException
public static String getHttpPort()
throws UrlMapperException
UrlMapperException
public static void addWebAppToHost(String hostName,
String uri,
String appType)
throws UrlMapperException
hostName - The virtual host nameuri - The web app to be deployed in the virtual host
UrlMapperException - When adding directory throws an Exception
public static String getWebappPath(String webappsDir,
String uri,
String appType)
public static org.apache.catalina.Host addHostToEngine(String hostName)
hostName - name of the host
public static void deleteHostDirectory(String hostName)
hostName -
public static void editHostInEngine(String webAppName,
String newHost,
String oldHost)
throws UrlMapperException
webAppName - the associated webapp name of the host to be editedoldHost - the existing hostname to be editednewHost - the hostname given
UrlMapperException - throws when error while removing oldHost or adding newHost
public static void removeHost(String hostName)
throws UrlMapperException
hostName - name of the host to be removed
UrlMapperException - throws when error while removing context or host from engine
and from registry
public static void removeHostForCluster(String hostName)
throws UrlMapperException
UrlMapperExceptionpublic static void deleteServiceMapping(String epr)
epr - service endpoint of a servicepublic static void removeServiceMapping(String epr)
epr - service endpoint of a servicepublic static void addServiceMapping(String epr)
epr - seice endpoint of a service
public static void addDomainToServiceEpr(String hostName,
String url,
String appType)
throws UrlMapperException
hostName - url -
UrlMapperExceptionpublic static void addServiceParameter(String url)
public static void updateEprToRegistry(String newHost,
String oldHost)
throws UrlMapperException
newHost - new host to be updatedoldHost - existing old host
UrlMapperException
public static void deleteResourceToRegistry(String host)
throws UrlMapperException
host - hostName
UrlMapperExceptionpublic static String getContextFromUri(String uri)
uri - uri of the actual webapp url
public static String getServiceEndpoint(String url)
throws UrlMapperException
url - url of the service
UrlMapperExceptionpublic static boolean isServiceURLPattern(String url)
url - url of the service invoked
public static String getServiceName(String serviceContext)
public static void addServiceUrlMapping(int tenantId,
String serviceName)
public static void removeUrlMappingFromMap(int tenantId,
String serviceName)
public static String getTenantDomainFromTID(int tenantId)
public static String getUrlSuffix()
public static void setUrlSuffix(String urlSuffix)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||