Package org.geotools.gml2
Class ReferencingDirectiveLeakPreventer
Object
ReferencingDirectiveLeakPreventer
- All Implemented Interfaces:
Adapter
Adapter to prevent memory leaks that occur when importing a gml schema.
When an application schema imports the gml schema a link from the gml schema to the app schema is created. Since
the gml schema is a singleton we store permenantly this causes a memory leak. This adapter watches the
XSDSchema.getReferencingDirectives() list and ensures that it does not continue to grow by only allowing
unique schema references (in terms of target namespace) to reference it.
- Author:
- Justin Deoliveira, OpenGeo
-
Nested Class Summary
Nested classes/interfaces inherited from interface Adapter
Adapter.Internal -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionNotifierbooleanisAdapterForType(Object type) voidnotifyChanged(Notification notification) voidsetTarget(Notifier newTarget)
-
Constructor Details
-
ReferencingDirectiveLeakPreventer
public ReferencingDirectiveLeakPreventer()
-
-
Method Details
-
getTarget
public Notifier getTarget()- Specified by:
getTargetin interfaceAdapter
-
setTarget
public void setTarget(Notifier newTarget) - Specified by:
setTargetin interfaceAdapter
-
isAdapterForType
- Specified by:
isAdapterForTypein interfaceAdapter
-
notifyChanged
public void notifyChanged(Notification notification) - Specified by:
notifyChangedin interfaceAdapter
-