|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfedora.server.journal.xmlhelpers.AbstractXmlWriter
fedora.server.journal.JournalWriter
public abstract class JournalWriter
Title: JournalWriter.java
Description: The abstract base for all JournalWriter classes. Each child class is responsible for providing an XMLEventWriter that will receive the JournalEntry tag. This class will format a JournalEntry obbject into XML and add it to the XMLEventWriter.
| Field Summary | |
|---|---|
protected java.util.Map |
parameters
|
protected java.lang.String |
role
|
protected ServerInterface |
server
|
static java.lang.Object |
SYNCHRONIZER
A single object on which to synchronize all writing operations. |
| Constructor Summary | |
|---|---|
protected |
JournalWriter(java.util.Map parameters,
java.lang.String role,
ServerInterface server)
Concrete sub-classes must implement this constructor. |
| Method Summary | |
|---|---|
static JournalWriter |
getInstance(java.util.Map parameters,
java.lang.String role,
ServerInterface server)
Create an instance of the proper JournalWriter child class, as determined by the server parameters. |
abstract void |
prepareToWriteJournalEntry()
Concrete sub-classes should insure that a message transport is ready, and call {@link #writeDocumentHeader(XMLEventWriter) if needed. |
abstract void |
shutdown()
|
protected void |
writeDocumentHeader(javax.xml.stream.XMLEventWriter writer)
Subclasses should call this method to initialize a new Journal file. |
protected void |
writeDocumentTrailer(javax.xml.stream.XMLEventWriter writer)
Subclasses should call this method to close a Journal file. |
abstract void |
writeJournalEntry(CreatorJournalEntry journalEntry)
Concrete sub-classes should provide an XMLEventWriter, and call #writeJournalEntry(XMLEventWriter), after which, they should
probably flush the XMLEventWriter. |
protected void |
writeJournalEntry(CreatorJournalEntry journalEntry,
javax.xml.stream.XMLEventWriter writer)
Format a JournalEntry object and write a JournalEntry tag to the journal. |
| Methods inherited from class fedora.server.journal.xmlhelpers.AbstractXmlWriter |
|---|
putAttribute, putAttributeIfNotNull, putCharacters, putEndDocument, putEndTag, putStartDocument, putStartTag |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.Object SYNCHRONIZER
protected final java.lang.String role
protected final java.util.Map parameters
protected final ServerInterface server
| Constructor Detail |
|---|
protected JournalWriter(java.util.Map parameters,
java.lang.String role,
ServerInterface server)
| Method Detail |
|---|
public static JournalWriter getInstance(java.util.Map parameters,
java.lang.String role,
ServerInterface server)
throws JournalException
JournalException
public abstract void shutdown()
throws JournalException
JournalException
public abstract void prepareToWriteJournalEntry()
throws JournalException
JournalException
public abstract void writeJournalEntry(CreatorJournalEntry journalEntry)
throws JournalException
#writeJournalEntry(XMLEventWriter), after which, they should
probably flush the XMLEventWriter.
JournalException
protected void writeDocumentHeader(javax.xml.stream.XMLEventWriter writer)
throws JournalException
JournalException
protected void writeDocumentTrailer(javax.xml.stream.XMLEventWriter writer)
throws JournalException
JournalException
protected void writeJournalEntry(CreatorJournalEntry journalEntry,
javax.xml.stream.XMLEventWriter writer)
throws JournalException
JournalException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||