|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wso2.carbon.webapp.mgt.utils.GhostWebappDeployerUtils
public class GhostWebappDeployerUtils
Utility class for handling lazy loading of webapps
| Method Summary | |
|---|---|
static WebApplication |
addGhostWebApp(File ghostFile,
File originalFile,
TomcatGenericWebappsDeployer applicationDeployer,
org.apache.axis2.context.ConfigurationContext configContext)
Creates the Ghost webapplication by reading the ghost metadata file. |
static String |
calculateGhostFileName(String fileName,
String repoPath)
Calculate the ghost file name using the original file name. |
static WebApplication |
deployActualWebApp(WebApplication ghostWebapp,
org.apache.axis2.context.ConfigurationContext configurationContext)
Removes the given ghostWebapp and deploys the actual webapp. |
static void |
deployGhostArtifacts(org.apache.axis2.context.ConfigurationContext configContext)
|
static WebApplication |
dispatchWebAppFromTransitGhosts(String ctxName,
org.apache.axis2.context.ConfigurationContext cfgContext)
When a ghost webapp is removed from the webappsholder and the corresponding actual webapp is deployed, there's a time interval in which there's no Webapp in the webapps holder for the particular webapp context. |
static WebApplication |
findDeployedWebapp(org.apache.axis2.context.ConfigurationContext configurationContext,
String webappFilePath)
This method is used to find a webapplication from the webapps holder by comparing the webapp file absolute path. |
static String |
getDummyContextDirectoryPath(String contextName,
org.apache.axis2.engine.AxisConfiguration axisConfig)
Method which will return the dummy context directory path for current tenant which will be created in /tmp/tenants/ directory |
static File |
getDummyContextFile(String fileName,
org.apache.axis2.engine.AxisConfiguration axisConfig)
Calculate the dummy context file name using the original file name. |
static File |
getGhostFile(String fileName,
org.apache.axis2.engine.AxisConfiguration axisConfig)
Creates a File instance for the ghost service according to the original file name.. |
static Map<String,WebApplication> |
getTransitGhostWebAppsMap(org.apache.axis2.context.ConfigurationContext cfgContext)
Get the map of services which are in transit. |
static boolean |
isGhostWebApp(WebApplication webApplication)
Checks if the given webapp is a ghost webapp. |
static String |
separatorsToUnix(String path)
|
static void |
serializeWebApp(WebApplication webApplication,
org.apache.axis2.engine.AxisConfiguration axisConfig,
String webappPath)
Creates the ghost file for the current web application. |
static boolean |
skipUndeploy(String fileName)
Method to check if the undeploying of ghost related files needs to be skipped |
static void |
updateLastUsedTime(WebApplication webApplication)
Updates the last used timestamp of the given webapp. |
static void |
waitForWebAppToLeaveTransit(String contextName,
org.apache.axis2.context.ConfigurationContext cfgContext)
When a ghost webapp is removed from the WebappsHolder, context name of that webapp is kept temporary in a map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static WebApplication deployActualWebApp(WebApplication ghostWebapp,
org.apache.axis2.context.ConfigurationContext configurationContext)
ghostWebapp - Existing ghost WebappconfigurationContext - ConfigurationContext instance
public static void updateLastUsedTime(WebApplication webApplication)
webApplication - to be updatedpublic static Map<String,WebApplication> getTransitGhostWebAppsMap(org.apache.axis2.context.ConfigurationContext cfgContext)
cfgContext - - ConfigurationContext that holds the transitMap property
public static WebApplication dispatchWebAppFromTransitGhosts(String ctxName,
org.apache.axis2.context.ConfigurationContext cfgContext)
ctxName - - contextName of webappcfgContext - - ConfigurationContext to get the transitGhost webapps map
public static void waitForWebAppToLeaveTransit(String contextName,
org.apache.axis2.context.ConfigurationContext cfgContext)
contextName - - contextName to bec checked with the ghostTransitMapcfgContext - - ConfigurationContext to get the transitGhost webapps mappublic static boolean isGhostWebApp(WebApplication webApplication)
webApplication - - the webapp to be checked for ghost param
public static WebApplication addGhostWebApp(File ghostFile,
File originalFile,
TomcatGenericWebappsDeployer applicationDeployer,
org.apache.axis2.context.ConfigurationContext configContext)
ghostFile - - ghost metadata fileoriginalFile - - original webapp fileconfigContext - - configContext to get tenant details and webapp deployer instance
public static void serializeWebApp(WebApplication webApplication,
org.apache.axis2.engine.AxisConfiguration axisConfig,
String webappPath)
webApplication - - Webapplication to be serializedaxisConfig - - AxisConfiguration instancewebappPath - - Absolute path to the webapp artifact
public static File getGhostFile(String fileName,
org.apache.axis2.engine.AxisConfiguration axisConfig)
fileName - - original service file nameaxisConfig - - AxisConfiguration instance
public static String calculateGhostFileName(String fileName,
String repoPath)
fileName - - original file namerepoPath - - path of the axis2 repository
public static WebApplication findDeployedWebapp(org.apache.axis2.context.ConfigurationContext configurationContext,
String webappFilePath)
configurationContext - - configurationContext instance that has the webapps holder propertywebappFilePath - - absolute path of the webapp to be compared with other webapps in the holder
public static String getDummyContextDirectoryPath(String contextName,
org.apache.axis2.engine.AxisConfiguration axisConfig)
contextName - - context nameaxisConfig - - axisConfig used to get tenant info
public static File getDummyContextFile(String fileName,
org.apache.axis2.engine.AxisConfiguration axisConfig)
fileName - - original file nameaxisConfig - - axisConfig
public static boolean skipUndeploy(String fileName)
fileName - name of the webapp file
public static void deployGhostArtifacts(org.apache.axis2.context.ConfigurationContext configContext)
public static String separatorsToUnix(String path)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||