public class WebApplication extends Object
Modifier and Type | Class and Description |
---|---|
static class |
WebApplication.HttpSession
Represents an HTTP session
|
class |
WebApplication.Statistics
Represents statistics corresponding to this webapp
|
Modifier and Type | Field and Description |
---|---|
static String |
ENABLE_SAAS
Key for the enable SAAS context parameter
|
Constructor and Description |
---|
WebApplication(TomcatGenericWebappsDeployer tomcatGenericWebappsDeployer,
org.apache.catalina.Context context,
File webappFile) |
Modifier and Type | Method and Description |
---|---|
void |
addParameter(String name,
String value) |
void |
delete()
Completely delete & destroy this Web application
|
void |
expireAllSessions()
Expire all sessions of this webapp
|
void |
expireSessions(long maxLifetimeMillis)
Expire sessions whose lifetime is greater than or equal to
maxLifetimeMillis |
void |
expireSessions(String[] sessionIDs)
Expire all specified sessions
|
String |
findParameter(String contextParamName) |
String[] |
findParameters() |
protected File |
getAppBase()
Return a File object representing the "application root" directory
for our associated Host.
|
protected String |
getBamEnableFromWebappMetaData()
Reads from webappmeta files and return wether bam enabled.
|
org.apache.catalina.Context |
getContext()
This method will return the Catalina Context for a particular webapp
|
String |
getContextName() |
String |
getDisplayName() |
boolean |
getDistributable() |
String |
getDocBase() |
Exception |
getFaultReason() |
String |
getHostName() |
long |
getLastModifiedTime() |
Object |
getProperty(String key) |
String |
getServiceListPath() |
WebApplication.HttpSession |
getSession(String sessionId)
Get the session corresponding to the
sessionId |
List<WebApplication.HttpSession> |
getSessions()
Get all the current sessions for this webapp
|
String |
getState() |
WebApplication.Statistics |
getStatistics() |
TomcatGenericWebappsDeployer |
getTomcatGenericWebappsDeployer() |
String |
getVersion() |
File |
getWebappFile() |
void |
lazyUnload()
Lazily unload this Web application.
|
boolean |
reload() |
void |
removeParameter(String name) |
void |
setDisplayName(String name) |
void |
setDistributable(boolean distributable) |
void |
setDocBase(String docBase) |
void |
setFaultReason(Exception faultReason) |
void |
setHostName(String hostName) |
void |
setIsGhostWebapp(boolean isThisGhost)
We need this method in ghost mode because, this will set a static variable which indicates
whether this Webapp is a ghost.
|
void |
setLastModifiedTime(long lastModifiedTime) |
void |
setProperty(String key,
Object value) |
void |
setServiceListPath(String serviceListPath) |
void |
setServletContextParameters(List<WebContextParameter> parameters)
Set ServletContext parameters for this webapp
|
void |
setState(String state) |
void |
setVersion(String version) |
void |
setWebappFile(File webappFile) |
boolean |
start()
Start a webapp which was stopped
|
boolean |
stop()
Temporarilly stop this Web application.
|
String |
toString() |
void |
undeploy()
Completely delete & destroy this Web application.
|
protected void |
updateWebappMetaDataforBam(String value) |
public static final String ENABLE_SAAS
public WebApplication(TomcatGenericWebappsDeployer tomcatGenericWebappsDeployer, org.apache.catalina.Context context, File webappFile)
public void setServletContextParameters(List<WebContextParameter> parameters)
parameters
- ServletContext attributes for this webapppublic File getWebappFile()
public void setWebappFile(File webappFile)
public String getContextName()
public String getDisplayName()
public void setDisplayName(String name)
public void setLastModifiedTime(long lastModifiedTime)
public long getLastModifiedTime()
public void setState(String state)
public String getState()
public Exception getFaultReason()
public void setFaultReason(Exception faultReason)
public boolean getDistributable()
public void setDistributable(boolean distributable)
public String getDocBase()
public void setDocBase(String docBase)
public void removeParameter(String name)
public String[] findParameters()
public TomcatGenericWebappsDeployer getTomcatGenericWebappsDeployer()
public boolean reload()
protected String getBamEnableFromWebappMetaData() throws org.apache.axis2.AxisFault, org.wso2.carbon.core.persistence.metadata.ArtifactMetadataException
org.apache.axis2.AxisFault
org.wso2.carbon.core.persistence.metadata.ArtifactMetadataException
protected void updateWebappMetaDataforBam(String value)
public boolean stop() throws org.wso2.carbon.CarbonException
org.wso2.carbon.CarbonException
- If an error occurs while stopping this webapppublic boolean start() throws org.wso2.carbon.CarbonException
org.wso2.carbon.CarbonException
- If an error occurs while starting this webapppublic void lazyUnload() throws org.wso2.carbon.CarbonException
org.wso2.carbon.CarbonException
- If an error occurs while lazy unloadingpublic void undeploy() throws org.wso2.carbon.CarbonException
org.wso2.carbon.CarbonException
- If an error occurs while undeploying this webapppublic void delete() throws org.wso2.carbon.CarbonException
org.wso2.carbon.CarbonException
- If an error occurs while undeploying this webappprotected File getAppBase()
public void expireAllSessions()
public void expireSessions(long maxLifetimeMillis)
maxLifetimeMillis
maxLifetimeMillis
- The maximum session lifetime in millisecondspublic void expireSessions(String[] sessionIDs) throws org.wso2.carbon.CarbonException
sessionIDs
- The IDs of the sessions to be expiredorg.wso2.carbon.CarbonException
- If an error occurs while getting the sessionpublic List<WebApplication.HttpSession> getSessions()
public WebApplication.HttpSession getSession(String sessionId) throws org.wso2.carbon.CarbonException
sessionId
sessionId
- The session IDsessionId
org.wso2.carbon.CarbonException
- If an error occurs while retrieving the sessionpublic WebApplication.Statistics getStatistics()
public String getServiceListPath()
public void setServiceListPath(String serviceListPath)
public String getVersion()
public void setVersion(String version)
public String getHostName()
public void setHostName(String hostName)
public org.apache.catalina.Context getContext()
public void setIsGhostWebapp(boolean isThisGhost)
isThisGhost
- boolean parameter to set the static variableCopyright © 2018 WSO2. All rights reserved.