public class DistributedApplicationStore extends ApplicationArchive implements ApplicationStore
Modifier and Type | Class and Description |
---|---|
static class |
DistributedApplicationStore.InternalState |
Modifier and Type | Field and Description |
---|---|
protected ClusterCommunicationService |
clusterCommunicator |
protected ClusterService |
clusterService |
protected ApplicationIdStore |
idStore |
protected StorageService |
storageService |
protected VersionService |
versionService |
delegate
Constructor and Description |
---|
DistributedApplicationStore() |
Modifier and Type | Method and Description |
---|---|
void |
activate() |
void |
activate(ApplicationId appId)
Mark the application as active.
|
Application |
create(InputStream appDescStream)
Creates the application from the specified application descriptor
input stream.
|
void |
deactivate() |
void |
deactivate(ApplicationId appId)
Mark the application as deactivated.
|
Application |
getApplication(ApplicationId appId)
Returns the application with the supplied application identifier.
|
InputStream |
getApplicationArchive(ApplicationId appId)
Returns stream that contains the application OAR/JAR file contents.
|
Set<Application> |
getApplications()
Returns the set of all installed applications.
|
ApplicationId |
getId(String name)
Returns the registered id of the application with the given name.
|
Set<Permission> |
getPermissions(ApplicationId appId)
Returns the permissions granted to the applications.
|
ApplicationState |
getState(ApplicationId appId)
Returns the current application state.
|
void |
remove(ApplicationId appId)
Removes the specified application.
|
void |
setDelegate(ApplicationStoreDelegate delegate)
Sets the delegate on the store.
|
void |
setPermissions(ApplicationId appId,
Set<Permission> permissions)
Updates the permissions granted to the applications.
|
clearActive, getApplicationDescription, getApplicationInputStream, getApplicationNames, getRole, getRootPath, getUpdateTime, isActive, purgeApplication, saveApplication, setActive, setRootPath, updateTime
hasDelegate, notifyDelegate, notifyDelegate, unsetDelegate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
hasDelegate, unsetDelegate
protected ClusterCommunicationService clusterCommunicator
protected ClusterService clusterService
protected StorageService storageService
protected ApplicationIdStore idStore
protected VersionService versionService
public void activate()
public void deactivate()
public void setDelegate(ApplicationStoreDelegate delegate)
Store
setDelegate
in interface Store<ApplicationEvent,ApplicationStoreDelegate>
setDelegate
in class AbstractStore<ApplicationEvent,ApplicationStoreDelegate>
delegate
- new store delegatepublic Set<Application> getApplications()
ApplicationStore
getApplications
in interface ApplicationStore
public ApplicationId getId(String name)
ApplicationStore
getId
in interface ApplicationStore
name
- application namepublic Application getApplication(ApplicationId appId)
ApplicationStore
getApplication
in interface ApplicationStore
appId
- application identifierpublic ApplicationState getState(ApplicationId appId)
ApplicationStore
getState
in interface ApplicationStore
appId
- application identifierpublic Application create(InputStream appDescStream)
ApplicationStore
create
in interface ApplicationStore
appDescStream
- application archive input streampublic void remove(ApplicationId appId)
ApplicationStore
remove
in interface ApplicationStore
appId
- application identifierpublic void activate(ApplicationId appId)
ApplicationStore
activate
in interface ApplicationStore
appId
- application identifierpublic void deactivate(ApplicationId appId)
ApplicationStore
deactivate
in interface ApplicationStore
appId
- application identifierpublic Set<Permission> getPermissions(ApplicationId appId)
ApplicationStore
getPermissions
in interface ApplicationStore
appId
- application identifierpublic void setPermissions(ApplicationId appId, Set<Permission> permissions)
ApplicationStore
setPermissions
in interface ApplicationStore
appId
- application identifierpermissions
- set of granted permissionspublic InputStream getApplicationArchive(ApplicationId appId)
ApplicationStore
getApplicationArchive
in interface ApplicationStore
appId
- application identifier