Class ContainerConfiguration
java.lang.Object
org.gcube.smartgears.configuration.container.ContainerConfiguration
The configuration of the container.
- Author:
- Fabio Simeoni, Luca Frosini (ISTI-CNR)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the persistence manager of the container.Returns the configuration of an application with a given context path.Adds the configuration of an application to this configuration.apps()Returns the application configurations included in this configuration.Returns the authorization configuration.booleanReturns whether children context authorization is enabled.booleanReturns whether token expiration should be checked.hostname()Returns the host name of the container.Returns the infrastructure in which the container is running.mode()Returns the management mode for the container.Returns the persistence manager of the container.intport()Returns the port at which the container is listening for requests.Returns the configuration properties of the container.protocol()Returns the port at which the container is listening for requests.proxy()Returns the proxy of the container.longReturns the publication frequency for the container's profile.protected voidsetAccountingFallbackLocation(String accountingFallbackLocation) Sets the accounting fallback location.voidsetApps(List<ApplicationConfiguration> apps) Sets the application configurations.protected voidsetAuthorizationProviderConfiguration(AuthorizationProviderConfiguration authorizationConfiguration) Sets the authorization provider configuration.protected voidsetBaseConfiguration(BaseConfiguration baseConfiguration) Sets the base configuration.protected voidsetPersistenceConfiguration(PersistenceConfiguration persistenceConfiguration) Sets the persistence configuration.protected voidsetProperties(Map<String, String> properties) Sets the configuration properties.protected voidsetProxy(ProxyAddress proxy) Sets the proxy configuration.protected voidSets the site configuration.site()Returns the geographical site of the container.toString()voidvalidate()Validates this configuration
-
Constructor Details
-
ContainerConfiguration
public ContainerConfiguration()
-
-
Method Details
-
setBaseConfiguration
Sets the base configuration.- Parameters:
baseConfiguration- the base configuration to set
-
setProperties
Sets the configuration properties.- Parameters:
properties- the properties to set
-
setSite
Sets the site configuration.- Parameters:
site- the site to set
-
setProxy
Sets the proxy configuration.- Parameters:
proxy- the proxy to set
-
setAccountingFallbackLocation
Sets the accounting fallback location.- Parameters:
accountingFallbackLocation- the accounting fallback location to set
-
setPersistenceConfiguration
Sets the persistence configuration.- Parameters:
persistenceConfiguration- the persistence configuration to set
-
setAuthorizationProviderConfiguration
protected void setAuthorizationProviderConfiguration(AuthorizationProviderConfiguration authorizationConfiguration) Sets the authorization provider configuration.- Parameters:
authorizationConfiguration- the authorization configuration to set
-
setApps
Sets the application configurations.- Parameters:
apps- the application configurations to set
-
mode
Returns the management mode for the container.- Returns:
- the management mode
-
checkTokenExpiration
public boolean checkTokenExpiration()Returns whether token expiration should be checked.- Returns:
- true if token expiration should be checked, false otherwise
-
apps
Returns the application configurations included in this configuration.- Returns:
- the application configurations
-
app
Returns the configuration of an application with a given context path.- Parameters:
context- the context path- Returns:
- the application configuration
-
app
Adds the configuration of an application to this configuration.- Parameters:
app- the application configuration- Returns:
- this configuration
-
site
Returns the geographical site of the container.- Returns:
- the site
-
infrastructure
Returns the infrastructure in which the container is running.- Returns:
- the infrastructure
-
hostname
Returns the host name of the container.- Returns:
- the host name;
-
port
public int port()Returns the port at which the container is listening for requests.- Returns:
- the port
-
protocol
Returns the port at which the container is listening for requests.- Returns:
- the port
-
authorizeChildrenContext
public boolean authorizeChildrenContext()Returns whether children context authorization is enabled.- Returns:
- true if children context authorization is enabled, false otherwise
-
proxy
Returns the proxy of the container.- Returns:
- the proxy
-
persistenceConfiguration
Returns the persistence manager of the container.- Returns:
- the manager
-
accountingFallbackLocation
Returns the persistence manager of the container.- Returns:
- the manager
-
authorizationConfiguration
Returns the authorization configuration.- Returns:
- AuthorizationProviderConfiguration the configuration
-
properties
Returns the configuration properties of the container.- Returns:
- the properties
-
publicationFrequency
public long publicationFrequency()Returns the publication frequency for the container's profile.- Returns:
- the frquency;
-
validate
public void validate()Validates this configuration- Throws:
IllegalStateException- if the configuration is invalid
-
toString
-