Package org.mycore.common.xml
Class MCRDOMUtils
java.lang.Object
org.mycore.common.xml.MCRDOMUtils
- All Implemented Interfaces:
Comparable<MCRShutdownHandler.Closeable>
,MCRShutdownHandler.Closeable
Helper class to get
DocumentBuilder
instances from a common pool- Author:
- Thomas Scheffler (yagee)
-
Field Summary
Fields inherited from interface org.mycore.common.events.MCRShutdownHandler.Closeable
DEFAULT_PRIORITY
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
cleanly closes this object that implementsCloseable
.static DocumentBuilder
static DocumentBuilder
int
Returns the priority.void
prepare for closing this object that implementsCloseable
.static void
releaseDocumentBuilder
(DocumentBuilder documentBuilder) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.mycore.common.events.MCRShutdownHandler.Closeable
compareTo
-
Method Details
-
getDocumentBuilder
- Throws:
ParserConfigurationException
-
getDocumentBuilderUnchecked
-
releaseDocumentBuilder
-
close
public void close()Description copied from interface:MCRShutdownHandler.Closeable
cleanly closes this object that implementsCloseable
. You can provide some functionality to close open files and sockets or so.- Specified by:
close
in interfaceMCRShutdownHandler.Closeable
-
getPriority
public int getPriority()Description copied from interface:MCRShutdownHandler.Closeable
Returns the priority. A Closeable with a higher priority will be closed before a Closeable with a lower priority. Default priority is 5.- Specified by:
getPriority
in interfaceMCRShutdownHandler.Closeable
-
prepareClose
public void prepareClose()Description copied from interface:MCRShutdownHandler.Closeable
prepare for closing this object that implementsCloseable
. This is the first part of the closing process. As a object may need database access to close cleanly this method can be used to be ahead of database outtake.- Specified by:
prepareClose
in interfaceMCRShutdownHandler.Closeable
-