|
SOAj Consolidated |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.soaj.core.util.internal.SjCacher
public class SjCacher
This singleton class provides caching and holds reference instances of plugins.
Copyright (c) 2006 - 2009 by Global Technology Consulting Group, Inc. at gtcGroup.com .
| Field Summary | |
|---|---|
private java.util.Map<java.lang.String,SjPluginProperties> |
activeProperties
Map of properties with an "active" declaration. |
private java.util.Map<java.lang.String,SjBasePlugin> |
alwaysInstantiatePlugins
Map of plugins with an "always instantiate" declaration. |
private static SjCacher |
cacher
Singleton's private instance. |
private static java.lang.String |
CLASS_NAME
Class name. |
private java.util.List<java.lang.String> |
inactivePluginKeyList
List of plugin keys for plugins declared "inactive". |
private java.util.Map<java.lang.String,SjBaseMetadata> |
pluginMetadata
Map of metadata with an "active" declaration. |
private java.util.Map<java.lang.String,SjBasePlugin> |
strongReferencePlugins
Cache of plugins with a "strong reference" declaration. |
| Constructor Summary | |
|---|---|
private |
SjCacher()
Constructor - Initializes cache. |
| Method Summary | ||
|---|---|---|
void |
clearAllCacheForTestingOnly()
This method clears all cache. |
|
boolean |
containsActivePlugin(SjPopulatedPluginKey populatedPluginKey)
This method returns whether an active plugin exists. |
|
boolean |
containsActiveProperties(SjPopulatedPluginKey populatedPluginKey)
This method determines whether an active set of properties is cached for a declared plugin key. |
|
private boolean |
containsAlwaysInstantiatePlugin(SjPopulatedPluginKey populatedPluginKey)
This method returns whether a plugin reference copy exists. |
|
boolean |
containsInactivePluginKey(SjPopulatedPluginKey populatedPluginKey)
This method returns whether a plugin key has been declared as inactive. |
|
boolean |
containsPluginMetadata(SjPopulatedPluginKey populatedPluginKey)
This method returns whether plugin metadata is cached for a declared plugin key. |
|
private boolean |
containsStrongReferencePlugin(SjPopulatedPluginKey populatedPluginKey)
This method returns whether cached plugin exists. |
|
|
createActivePlugin(java.lang.Class<PLUGIN> pluginAbstractClass,
SjPopulatedPluginKey populatedPluginKey,
boolean suppressException)
This method creates a plugin instance or null. |
|
(package private) java.util.Map<java.lang.String,SjBasePlugin> |
getCacheStrongReference()
This method returns a map for core framework utilization. |
|
java.util.List<java.lang.String> |
getInactivePluginKeyList()
This method returns the inactivePluginKeyList attribute. |
|
static SjCacher |
getInstance()
This method returns the reference to the singleton instance. |
|
(package private) java.util.Map<java.lang.String,SjPluginProperties> |
getMapActiveProperties()
This method returns a map for core framework utilization. |
|
(package private) java.util.Map<java.lang.String,SjBasePlugin> |
getMapAlwaysInstantiate()
This method returns a map for core framework utilization. |
|
void |
putActivePlugin(SjBasePlugin sjBasePlugin)
This method puts a plugin instance in a synchronized map. |
|
void |
putPluginMetadata(SjPopulatedPluginKey populatedPluginKey,
SjBaseMetadata pluginMetadata)
This method puts a properties instance in a synchronized map. |
|
void |
putPluginProperties(SjPluginProperties pluginProperties)
This method puts a properties instance in a synchronized map. |
|
SjPluginProperties |
retrieveActiveProperties(SjPopulatedPluginKey populatedPluginKey)
This method determines whether an active set of properties is cached for a declared plugin key. |
|
SjBaseMetadata |
retrievePluginMetadata(SjPopulatedPluginKey populatedPluginKey)
This method creates a plugin instance or null. |
|
private void |
verifyUniqueActivePluginKey(SjPopulatedPluginKey populatedPluginKey,
java.lang.String MethodName)
This method determines if an active plugin was previously put in a synchronized map and, if so, throws an exception. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String CLASS_NAME
private static SjCacher cacher
private final java.util.Map<java.lang.String,SjBasePlugin> strongReferencePlugins
private final java.util.Map<java.lang.String,SjBasePlugin> alwaysInstantiatePlugins
private final java.util.List<java.lang.String> inactivePluginKeyList
private final java.util.Map<java.lang.String,SjPluginProperties> activeProperties
private final java.util.Map<java.lang.String,SjBaseMetadata> pluginMetadata
| Constructor Detail |
|---|
private SjCacher()
| Method Detail |
|---|
public static SjCacher getInstance()
public void clearAllCacheForTestingOnly()
public boolean containsActiveProperties(SjPopulatedPluginKey populatedPluginKey)
populatedPluginKey - The 'Key' defined in the descriptor document.
public boolean containsPluginMetadata(SjPopulatedPluginKey populatedPluginKey)
populatedPluginKey - The 'Key' defined in the descriptor document.
public boolean containsInactivePluginKey(SjPopulatedPluginKey populatedPluginKey)
populatedPluginKey - The 'Key' defined in the descriptor document.
public boolean containsActivePlugin(SjPopulatedPluginKey populatedPluginKey)
populatedPluginKey - The 'Key' defined in the descriptor document.
public void putPluginProperties(SjPluginProperties pluginProperties)
pluginProperties - Base properties class for all SOAj plugins.
public void putPluginMetadata(SjPopulatedPluginKey populatedPluginKey,
SjBaseMetadata pluginMetadata)
populatedPluginKey - The 'Key' defined in the descriptor document.pluginMetadata - Base metadata class for all SOAj plugins.public void putActivePlugin(SjBasePlugin sjBasePlugin)
sjBasePlugin - Base class for all SOAj plugins.public SjPluginProperties retrieveActiveProperties(SjPopulatedPluginKey populatedPluginKey)
populatedPluginKey - The 'Key' defined in the descriptor document.
public SjBaseMetadata retrievePluginMetadata(SjPopulatedPluginKey populatedPluginKey)
null.
populatedPluginKey - The 'Key' defined in the descriptor document.
public <PLUGIN extends SjBasePlugin> PLUGIN createActivePlugin(java.lang.Class<PLUGIN> pluginAbstractClass,
SjPopulatedPluginKey populatedPluginKey,
boolean suppressException)
null.
PLUGIN - pluginAbstractClass - Typically the plugin's abstract super class.populatedPluginKey - The 'Key' defined in the descriptor document.suppressException - Indicates whether an exception is thrown, or null
returned, if the plugin can not be created.
null.java.util.Map<java.lang.String,SjBasePlugin> getCacheStrongReference()
strongReferencePlugins attribute.java.util.Map<java.lang.String,SjBasePlugin> getMapAlwaysInstantiate()
alwaysInstantiatePlugins
attribute.public java.util.List<java.lang.String> getInactivePluginKeyList()
inactivePluginKeyList attribute.
java.util.Map<java.lang.String,SjPluginProperties> getMapActiveProperties()
activeProperties attribute.
private void verifyUniqueActivePluginKey(SjPopulatedPluginKey populatedPluginKey,
java.lang.String MethodName)
throws SjCoreExceptionDuplicatePluginKey
populatedPluginKey - The 'Key' defined in the descriptor document.MethodName - Method name used for throwing an exception.
SjCoreExceptionDuplicatePluginKeyprivate boolean containsStrongReferencePlugin(SjPopulatedPluginKey populatedPluginKey)
populatedPluginKey - The 'Key' defined in the descriptor document.
private boolean containsAlwaysInstantiatePlugin(SjPopulatedPluginKey populatedPluginKey)
populatedPluginKey - The 'Key' defined in the descriptor document.
|
SOAj Consolidated |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright (c) 2006 - 2009 by Global Technology Consulting Group, Inc. at gtcGroup.com.
Use is authorized, provided the source is acknowledged by inclusion of this copyright notice.