2016-11-25 15:42:29 +01:00
|
|
|
package org.gcube.smartgears.context.application;
|
|
|
|
|
|
|
|
import javax.servlet.ServletContext;
|
|
|
|
|
|
|
|
import org.gcube.common.events.Hub;
|
|
|
|
import org.gcube.smartgears.configuration.application.ApplicationConfiguration;
|
|
|
|
import org.gcube.smartgears.context.Properties;
|
|
|
|
import org.gcube.smartgears.context.container.ContainerContext;
|
|
|
|
import org.gcube.smartgears.lifecycle.application.ApplicationLifecycle;
|
2022-03-17 17:17:15 +01:00
|
|
|
import org.gcube.smartgears.persistence.PersistenceWriter;
|
2016-11-25 15:42:29 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The management context of an application.
|
|
|
|
*
|
|
|
|
* @author Fabio Simeoni
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public interface ApplicationContext {
|
|
|
|
|
|
|
|
|
|
|
|
String id();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the name of the application.
|
|
|
|
*
|
|
|
|
* @return the name
|
|
|
|
*/
|
|
|
|
String name();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the configuration of the application.
|
|
|
|
*
|
|
|
|
* @return the configuration
|
|
|
|
*/
|
|
|
|
ApplicationConfiguration configuration();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the lifecycle of the application.
|
|
|
|
*
|
|
|
|
* @return the lifecycle
|
|
|
|
*/
|
|
|
|
ApplicationLifecycle lifecycle();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the event hub of the application
|
|
|
|
*
|
|
|
|
* @return the hub
|
|
|
|
*/
|
|
|
|
Hub events();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the persistence manager of the application.
|
|
|
|
*
|
|
|
|
* @return the manager
|
|
|
|
*/
|
2022-03-17 17:17:15 +01:00
|
|
|
PersistenceWriter persistence();
|
2016-11-25 15:42:29 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the servlet context of the application.
|
|
|
|
*
|
|
|
|
* @return the context
|
|
|
|
*/
|
|
|
|
ServletContext application();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the management context of the container.
|
|
|
|
*
|
|
|
|
* @return the context
|
|
|
|
*/
|
|
|
|
ContainerContext container();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the properties of the application
|
|
|
|
*
|
|
|
|
* @return the properties
|
|
|
|
*/
|
|
|
|
Properties properties();
|
|
|
|
|
2022-03-21 11:17:07 +01:00
|
|
|
|
2016-11-25 15:42:29 +01:00
|
|
|
}
|