fedora.server.journal.readerwriter.multicast
Class LocalDirectoryTransport
java.lang.Object
fedora.server.journal.readerwriter.multicast.Transport
fedora.server.journal.readerwriter.multicast.LocalDirectoryTransport
public class LocalDirectoryTransport
- extends Transport
LocalDirectoryTransport.java
Writes Journal files to a local disk directory. It requires these parameters:
- directoryPath - full path to the directory where the Journals will be
stored.
- Version:
- $Id: LocalDirectoryTransport.java,v 1.1 2007/03/06 15:02:58 jblake
Exp $
- Author:
- jblake
|
Method Summary |
void |
closeFile()
On a request to close the file,
check that we are in a valid state,
close the XMLEventWriter and the TransportOutputFile,
set the state.
|
javax.xml.stream.XMLEventWriter |
getWriter()
Check that our current state is correct before filling a request for an
XMLEventWriter. |
void |
openFile(java.lang.String repositoryHash,
java.lang.String filename,
java.util.Date currentDate)
On a request to open the file,
check that we are in a valid state,
create the file,
create the XMLEventWriter for use on the file,
ask the parent to write the header to the file,
set the state.
|
void |
shutdown()
On a request to shut down,
check that we are in a valid state,
set the state.
If we have already shut down, a second call is not an error, but requires
no action. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PARAMETER_DIRECTORY_PATH
public static final java.lang.String PARAMETER_DIRECTORY_PATH
- See Also:
- Constant Field Values
LocalDirectoryTransport
public LocalDirectoryTransport(java.util.Map<java.lang.String,java.lang.String> parameters,
boolean crucial,
TransportParent parent)
throws JournalException
- Throws:
JournalException
openFile
public void openFile(java.lang.String repositoryHash,
java.lang.String filename,
java.util.Date currentDate)
throws JournalException
- On a request to open the file,
- check that we are in a valid state,
- create the file,
- create the
XMLEventWriter for use on the file,
- ask the parent to write the header to the file,
- set the state.
- Specified by:
openFile in class Transport
- Throws:
JournalException
getWriter
public javax.xml.stream.XMLEventWriter getWriter()
throws JournalException
- Check that our current state is correct before filling a request for an
XMLEventWriter.
- Specified by:
getWriter in class Transport
- Throws:
JournalException
closeFile
public void closeFile()
throws JournalException
- On a request to close the file,
- check that we are in a valid state,
- close the
XMLEventWriter and the TransportOutputFile,
- set the state.
- Specified by:
closeFile in class Transport
- Throws:
JournalException
shutdown
public void shutdown()
throws JournalException
- On a request to shut down,
- check that we are in a valid state,
- set the state.
If we have already shut down, a second call is not an error, but requires
no action.
- Specified by:
shutdown in class Transport
- Throws:
JournalException