Package org.n52.io.handler
Class ConfigTypedFactory<T>
java.lang.Object
org.n52.io.handler.ConfigTypedFactory<T>
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
DefaultIoFactory
public abstract class ConfigTypedFactory<T>
extends Object
implements org.springframework.context.ApplicationContextAware
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConfigTypedFactory(File configFile) protectedprotectedConfigTypedFactory(String defaultConfig) -
Method Summary
Modifier and TypeMethodDescriptiongetCacheEntry(String type) protected static InputStreamgetDefaultConfigFile(String configLocation) protected abstract StringTries to load a default config file which can be found by the target type's classloader.protected abstract Class<?>booleanhasCacheEntry(String type) protected TinitInstance(T instance) booleanvoidsetApplicationContext(org.springframework.context.ApplicationContext context)
-
Field Details
-
cache
-
mappings
-
-
Constructor Details
-
ConfigTypedFactory
-
ConfigTypedFactory
-
ConfigTypedFactory
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext context) - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
getDefaultConfigFile
-
isKnown
-
getKnownTypes
-
hasCacheEntry
-
getCacheEntry
-
create
- Throws:
DatasetFactoryException
-
getFallbackConfigResource
Tries to load a default config file which can be found by the target type's classloader.- Returns:
- a relative path to the config within the jar
- See Also:
-
getTargetType
- Returns:
- the type this factory creates
-
initInstance
-