fedora.server.journal.readerwriter.multicast
Class LocalDirectoryTransport

java.lang.Object
  extended by fedora.server.journal.readerwriter.multicast.Transport
      extended by 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:

Version:
$Id: LocalDirectoryTransport.java,v 1.1 2007/03/06 15:02:58 jblake Exp $
Author:
jblake

Nested Class Summary
 
Nested classes/interfaces inherited from class fedora.server.journal.readerwriter.multicast.Transport
Transport.State
 
Field Summary
static java.lang.String PARAMETER_DIRECTORY_PATH
           
 
Fields inherited from class fedora.server.journal.readerwriter.multicast.Transport
crucial, parameters, parent
 
Constructor Summary
LocalDirectoryTransport(java.util.Map<java.lang.String,java.lang.String> parameters, boolean crucial, TransportParent parent)
           
 
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 fedora.server.journal.readerwriter.multicast.Transport
getState, isCrucial, setState, testStateChange, testWriterState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMETER_DIRECTORY_PATH

public static final java.lang.String PARAMETER_DIRECTORY_PATH
See Also:
Constant Field Values
Constructor Detail

LocalDirectoryTransport

public LocalDirectoryTransport(java.util.Map<java.lang.String,java.lang.String> parameters,
                               boolean crucial,
                               TransportParent parent)
                        throws JournalException
Throws:
JournalException
Method Detail

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,

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,

Specified by:
closeFile in class Transport
Throws:
JournalException

shutdown

public void shutdown()
              throws JournalException
On a request to shut down, 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