public interface ApplicationService
| Modifier and Type | Method and Description |
|---|---|
void |
addHealthMonitor(String appId,
ApplicationHealthMonitor healthMonitor)
Adds a health monitor listener for application health.
|
void |
addListener(ApplicationListener listener)
Adds a listener for application installation and run state changes.
|
Application |
getApplication(String appId)
Returns the application with the given unique id.
|
List<Application> |
getApplications()
Returns a list of all installed applications.
|
File |
getArchive(Application app)
Retrieves the application archive.
|
ApplicationHealthStatus |
getHealthStatus(String appId)
Returns the state of the application given an application id.
|
Application |
install(String appId,
Authentication auth)
Installs an application.
|
void |
removeHealthMonitor(String appId)
Removes a health monitor listener for application health.
|
void |
removeListener(ApplicationListener listener)
Removes a listener for application installation and run state changes.
|
Application |
resolve(String appId,
Authentication auth)
Install the application but do not make active.
|
Application |
start(String appId,
Authentication auth)
Starts an application.
|
Application |
stop(String appId,
Authentication auth)
Stops an application.
|
void |
uninstall(String appId,
Authentication auth)
Uninstalls an application.
|
Application |
upload(InputStream uploadStream,
String fileName,
Authentication auth)
Uploads an application archive to the system.
|
Application upload(InputStream uploadStream, String fileName, Authentication auth)
uploadStream - input stream for uploadfileName - application archive nameauth - the authentication record for the user that invoked this
methodApplication install(String appId, Authentication auth)
appId - application unique idauth - the authentication record for the userApplication resolve(String appId, Authentication auth)
appId - application unique idauth - the authentication record for the uservoid uninstall(String appId, Authentication auth)
appId - application unique idauth - the authentication record for the user that invoked this
method performed on other nodes in case of clusterNotFoundException - if application with the given id is not foundApplication start(String appId, Authentication auth)
appId - application unique idauth - the authentication record for the user that invoked this
methodNotFoundException - if application with the given id is not foundApplication stop(String appId, Authentication auth)
appId - application unique idauth - the authentication record for the user that invoked this
methodNotFoundException - if application with the given id is not foundApplication getApplication(String appId) throws NotFoundException
appId - unique application idNotFoundException - if application with the given id is not foundList<Application> getApplications()
NotFoundException - if application with the given id is not foundFile getArchive(Application app) throws NotFoundException
app - application idNotFoundException - if the archive is not foundvoid addListener(ApplicationListener listener)
listener - listener to be addedvoid removeListener(ApplicationListener listener)
listener - listener to be addedvoid addHealthMonitor(String appId, ApplicationHealthMonitor healthMonitor)
appId - unique identifier for the application whose health will be
monitoredhealthMonitor - health monitor listener to be addedvoid removeHealthMonitor(String appId)
appId - unique identifier for the application whose health will be
monitoredApplicationHealthStatus getHealthStatus(String appId)
appId - id of the applicationCopyright © 2014. All Rights Reserved.