Class DefaultContainerContext
- java.lang.Object
-
- org.gcube.smartgears.context.container.DefaultContainerContext
-
- All Implemented Interfaces:
ContainerContext
public class DefaultContainerContext extends Object implements ContainerContext
DefaultContainerContextimplementation.- Author:
- Fabio Simeoni
-
-
Constructor Summary
Constructors Constructor Description DefaultContainerContext(String id, ContainerConfiguration configuration, org.gcube.common.events.Hub hub, ContainerLifecycle lifecycle, Properties properties)Creates an instance with mandatory parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContainerConfigurationconfiguration()Returns the configuration of the container.org.gcube.common.events.Hubevents()Returns the event hub of the containerStringid()ContainerLifecyclelifecycle()Returns the lifecycle of the containerPersistencepersistence()Returns the persistence manager of the container.<T> Tprofile(Class<T> type)Returns the resource profile of a given type of the container.Propertiesproperties()Returns the properties of the container.
-
-
-
Constructor Detail
-
DefaultContainerContext
public DefaultContainerContext(String id, ContainerConfiguration configuration, org.gcube.common.events.Hub hub, ContainerLifecycle lifecycle, Properties properties)
Creates an instance with mandatory parameters.- Parameters:
configuration- the configurationhub- the event hublifecycle- the lifecycleproperties- the properties
-
-
Method Detail
-
profile
public <T> T profile(Class<T> type)
Description copied from interface:ContainerContextReturns the resource profile of a given type of the container.- Specified by:
profilein interfaceContainerContext- Returns:
- the profile
-
configuration
public ContainerConfiguration configuration()
Description copied from interface:ContainerContextReturns the configuration of the container.- Specified by:
configurationin interfaceContainerContext- Returns:
- the configuration
-
lifecycle
public ContainerLifecycle lifecycle()
Description copied from interface:ContainerContextReturns the lifecycle of the container- Specified by:
lifecyclein interfaceContainerContext- Returns:
- the lifecycle
-
events
public org.gcube.common.events.Hub events()
Description copied from interface:ContainerContextReturns the event hub of the container- Specified by:
eventsin interfaceContainerContext- Returns:
- the hub
-
persistence
public Persistence persistence()
Description copied from interface:ContainerContextReturns the persistence manager of the container.- Specified by:
persistencein interfaceContainerContext- Returns:
- the manager
-
properties
public Properties properties()
Description copied from interface:ContainerContextReturns the properties of the container.- Specified by:
propertiesin interfaceContainerContext- Returns:
- the properties
-
id
public String id()
- Specified by:
idin interfaceContainerContext
-
-