org.gcube.smartgears.context.container
Class DefaultContainerContext

java.lang.Object
  extended by org.gcube.smartgears.context.container.DefaultContainerContext
All Implemented Interfaces:
ContainerContext

public class DefaultContainerContext
extends Object
implements ContainerContext

Default ContainerContext implementation.

Author:
Fabio Simeoni

Constructor Summary
DefaultContainerContext(ContainerConfiguration configuration, org.gcube.common.events.Hub hub, ContainerLifecycle lifecycle, Properties properties)
          Creates an instance with mandatory parameters.
 
Method Summary
 ContainerConfiguration configuration()
          Returns the configuration of the container.
 org.gcube.common.events.Hub events()
          Returns the event hub of the container
 ContainerLifecycle lifecycle()
          Returns the lifecycle of the container
 Persistence persistence()
          Returns the persistence manager of the container.
<T> T
profile(Class<T> type)
          Returns the resource profile of a given type of the container.
 Properties properties()
          Returns the properties of the container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultContainerContext

public DefaultContainerContext(ContainerConfiguration configuration,
                               org.gcube.common.events.Hub hub,
                               ContainerLifecycle lifecycle,
                               Properties properties)
Creates an instance with mandatory parameters.

Parameters:
configuration - the configuration
hub - the event hub
lifecycle - the lifecycle
properties - the properties
Method Detail

profile

public <T> T profile(Class<T> type)
Description copied from interface: ContainerContext
Returns the resource profile of a given type of the container.

Specified by:
profile in interface ContainerContext
Returns:
the profile

configuration

public ContainerConfiguration configuration()
Description copied from interface: ContainerContext
Returns the configuration of the container.

Specified by:
configuration in interface ContainerContext
Returns:
the configuration

lifecycle

public ContainerLifecycle lifecycle()
Description copied from interface: ContainerContext
Returns the lifecycle of the container

Specified by:
lifecycle in interface ContainerContext
Returns:
the lifecycle

events

public org.gcube.common.events.Hub events()
Description copied from interface: ContainerContext
Returns the event hub of the container

Specified by:
events in interface ContainerContext
Returns:
the hub

persistence

public Persistence persistence()
Description copied from interface: ContainerContext
Returns the persistence manager of the container.

Specified by:
persistence in interface ContainerContext
Returns:
the manager

properties

public Properties properties()
Description copied from interface: ContainerContext
Returns the properties of the container.

Specified by:
properties in interface ContainerContext
Returns:
the properties


Copyright © 2013. All Rights Reserved.