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.DefaultContext
represents 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 ExtensibleConfigurableCacheFactory
buildFactory()
Build the ExtensibleConfigurableCacheFactory to be used by this context.String
getApplicationName()
Return the name of the application.String
getCacheConfigURI()
Return the cache configuration URI.CacheFactoryBuilder
getCacheFactoryBuilder()
Return theCacheFactoryBuilder
in use.ClassLoader
getClassLoader()
Return theClassLoader
in use.ConfigurableCacheFactory
getConfigurableCacheFactory()
Return the correspondingConfigurableCacheFactory
.ContainerContext
getContainerContext()
Return theContainerContext
associated with the ContainerAdapter.String
getDefaultScope()
Returns the default scope name to use.Context.ExtendedContext
getExtendedContext()
Serializer
getNamedSerializer(String sName)
Produces instances of a namedSerializer
.String
getPofConfigURI()
Return the POF configuration URI.ServiceMonitor
getServiceMonitor()
Return the keep-alive facility for the application services.com.tangosol.internal.net.ConfigurableCacheFactorySession
getSession()
Return theConfigurableCacheFactorySession
.
-
-
-
Constructor Detail
-
DefaultContext
public DefaultContext(CacheFactoryBuilder builder, ClassLoader loader, String sAppName, String sCacheConfigURI, ServiceMonitor monitor, String sPofConfigURI, ContainerContext ctx)
Constructor.- Parameters:
builder
- theCacheFactoryBuilder
to useloader
- theClassLoader
to usesAppName
- the application name to usesCacheConfigURI
- the cache configuration URImonitor
- theServiceMonitor
to usesPofConfigURI
- the POF configuration URIctx
- theContainerContext
to 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:
getConfigurableCacheFactory
in interfaceContext
- Returns:
- the
ConfigurableCacheFactory
-
getCacheFactoryBuilder
public CacheFactoryBuilder getCacheFactoryBuilder()
Return theCacheFactoryBuilder
in use.- Specified by:
getCacheFactoryBuilder
in interfaceContext
- Returns:
- the
CacheFactoryBuilder
-
getClassLoader
public ClassLoader getClassLoader()
Return theClassLoader
in use.- Specified by:
getClassLoader
in interfaceContext
- Returns:
- the
ClassLoader
-
getApplicationName
public String getApplicationName()
Return the name of the application.- Specified by:
getApplicationName
in interfaceContext
- Returns:
- the name of the application
-
getServiceMonitor
public ServiceMonitor getServiceMonitor()
Return the keep-alive facility for the application services.- Specified by:
getServiceMonitor
in 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:
getPofConfigURI
in interfaceContext
- Returns:
- the POF configuration URI
-
getCacheConfigURI
public String getCacheConfigURI()
Return the cache configuration URI.- Specified by:
getCacheConfigURI
in interfaceContext
- Returns:
- the cache configuration URI
-
getContainerContext
public ContainerContext getContainerContext()
Return theContainerContext
associated with the ContainerAdapter.- Specified by:
getContainerContext
in interfaceContext
- Returns:
- the
ContainerContext
instance or null
-
getDefaultScope
public String getDefaultScope()
Description copied from interface:Context
Returns the default scope name to use.- Specified by:
getDefaultScope
in interfaceContext
- Returns:
- the default scope name to use
-
getNamedSerializer
public Serializer getNamedSerializer(String sName)
Description copied from interface:Context
Produces instances of a namedSerializer
.- Specified by:
getNamedSerializer
in interfaceContext
- Parameters:
sName
- the name of the serializer- Returns:
- an instance of a named
Serializer
-
getExtendedContext
public Context.ExtendedContext getExtendedContext()
- Specified by:
getExtendedContext
in 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
-
-