Package com.tangosol.application
Class ContainerAdapter.DefaultContext
- java.lang.Object
-
- com.tangosol.application.ContainerAdapter.DefaultContext
-
- All Implemented Interfaces:
Context,Context.ExtendedContext
- Enclosing class:
- ContainerAdapter
public static class ContainerAdapter.DefaultContext extends Object implements Context.ExtendedContext
TheContainerAdapter.DefaultContextrepresents the context for an application.- Author:
- cf 2011.07.01
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.tangosol.application.Context
Context.ExtendedContext
-
-
Constructor Summary
Constructors Constructor Description DefaultContext(CacheFactoryBuilder builder, ClassLoader loader, String sAppName, String sCacheConfigURI, ServiceMonitor monitor, String sPofConfigURI, ContainerContext ctx)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ExtensibleConfigurableCacheFactorybuildFactory()Build the ExtensibleConfigurableCacheFactory to be used by this context.StringgetApplicationName()Return the name of the application.StringgetCacheConfigURI()Return the cache configuration URI.CacheFactoryBuildergetCacheFactoryBuilder()Return theCacheFactoryBuilderin use.ClassLoadergetClassLoader()Return theClassLoaderin use.ConfigurableCacheFactorygetConfigurableCacheFactory()Return the correspondingConfigurableCacheFactory.ContainerContextgetContainerContext()Return theContainerContextassociated with the ContainerAdapter.StringgetDefaultScope()Returns the default scope name to use.Context.ExtendedContextgetExtendedContext()SerializergetNamedSerializer(String sName)Produces instances of a namedSerializer.StringgetPofConfigURI()Return the POF configuration URI.ServiceMonitorgetServiceMonitor()Return the keep-alive facility for the application services.com.tangosol.internal.net.ConfigurableCacheFactorySessiongetSession()Return theConfigurableCacheFactorySession.
-
-
-
Constructor Detail
-
DefaultContext
public DefaultContext(CacheFactoryBuilder builder, ClassLoader loader, String sAppName, String sCacheConfigURI, ServiceMonitor monitor, String sPofConfigURI, ContainerContext ctx)
Constructor.- Parameters:
builder- theCacheFactoryBuilderto useloader- theClassLoaderto usesAppName- the application name to usesCacheConfigURI- the cache configuration URImonitor- theServiceMonitorto usesPofConfigURI- the POF configuration URIctx- theContainerContextto use
-
-
Method Detail
-
getConfigurableCacheFactory
public ConfigurableCacheFactory getConfigurableCacheFactory()
Return the correspondingConfigurableCacheFactory. This method will return the same reference as a call toctx.getExtendedContext().getCacheFactoryBuilder(). getConfigurableCacheFactory(ctx.getClassLoader());- Specified by:
getConfigurableCacheFactoryin interfaceContext- Returns:
- the
ConfigurableCacheFactory
-
getCacheFactoryBuilder
public CacheFactoryBuilder getCacheFactoryBuilder()
Return theCacheFactoryBuilderin use.- Specified by:
getCacheFactoryBuilderin interfaceContext- Returns:
- the
CacheFactoryBuilder
-
getClassLoader
public ClassLoader getClassLoader()
Return theClassLoaderin use.- Specified by:
getClassLoaderin interfaceContext- Returns:
- the
ClassLoader
-
getApplicationName
public String getApplicationName()
Return the name of the application.- Specified by:
getApplicationNamein interfaceContext- Returns:
- the name of the application
-
getServiceMonitor
public ServiceMonitor getServiceMonitor()
Return the keep-alive facility for the application services.- Specified by:
getServiceMonitorin interfaceContext- Returns:
- the
ServiceMonitor
-
getPofConfigURI
public String getPofConfigURI()
Return the POF configuration URI.For advanced use cases, the resource identified by this URI can be found by calling:
ctx.getExtendedContext().getClassLoader().getResource(ctx.getPofConfigUri());- Specified by:
getPofConfigURIin interfaceContext- Returns:
- the POF configuration URI
-
getCacheConfigURI
public String getCacheConfigURI()
Return the cache configuration URI.- Specified by:
getCacheConfigURIin interfaceContext- Returns:
- the cache configuration URI
-
getContainerContext
public ContainerContext getContainerContext()
Return theContainerContextassociated with the ContainerAdapter.- Specified by:
getContainerContextin interfaceContext- Returns:
- the
ContainerContextinstance or null
-
getDefaultScope
public String getDefaultScope()
Description copied from interface:ContextReturns the default scope name to use.- Specified by:
getDefaultScopein interfaceContext- Returns:
- the default scope name to use
-
getNamedSerializer
public Serializer getNamedSerializer(String sName)
Description copied from interface:ContextProduces instances of a namedSerializer.- Specified by:
getNamedSerializerin interfaceContext- Parameters:
sName- the name of the serializer- Returns:
- an instance of a named
Serializer
-
getExtendedContext
public Context.ExtendedContext getExtendedContext()
- Specified by:
getExtendedContextin interfaceContext- Returns:
- the
Context.ExtendedContext
-
getSession
public com.tangosol.internal.net.ConfigurableCacheFactorySession getSession()
Return theConfigurableCacheFactorySession.- Returns:
- the
ConfigurableCacheFactorySession
-
buildFactory
protected ExtensibleConfigurableCacheFactory buildFactory()
Build the ExtensibleConfigurableCacheFactory to be used by this context.- Returns:
- ExtensibleConfigurableCacheFactory instance
-
-