org.fcrepo.server.journal.readerwriter.multicast.rmi
Class RmiTransport

java.lang.Object
  extended by org.fcrepo.server.journal.readerwriter.multicast.Transport
      extended by org.fcrepo.server.journal.readerwriter.multicast.rmi.RmiTransport

public class RmiTransport
extends Transport

RmiTransport.java

Writes Journal files to an RmiJournalReceiver, either locally or on another machine. Requires parameters for the names of the receiving host and the receiving RMI service. Also accepts optional parameters for the RMI port number and the internal message buffer size.

Version:
$Id: RmiTransport.java,v 1.3 2007/06/01 17:21:32 jblake Exp $
Author:
jblake

Nested Class Summary
 
Nested classes/interfaces inherited from class org.fcrepo.server.journal.readerwriter.multicast.Transport
Transport.State
 
Field Summary
static int DEFAULT_BUFFER_SIZE
           
static int DEFAULT_PORT_NUMBER
           
static String PARAMETER_BUFFER_SIZE
           
static String PARAMETER_HOST_NAME
           
static String PARAMETER_PORT_NUMBER
           
static String PARAMETER_SERVICE_NAME
           
 
Fields inherited from class org.fcrepo.server.journal.readerwriter.multicast.Transport
crucial, parameters, parent
 
Constructor Summary
  RmiTransport(Map<String,String> parameters, boolean crucial, TransportParent parent)
           
protected RmiTransport(Map<String,String> parameters, boolean crucial, TransportParent parent, RmiJournalReceiverInterface rx)
           
 
Method Summary
 void closeFile()
          check state, write the file closing, close/flush the writer, send the close request, set state.
 XMLEventWriter getWriter()
          check state, hand over to the writer
 void openFile(String repositoryHash, String filename, Date currentDate)
          check state, send the open request, open a very special writer, write the file opening, set state
 void shutdown()
          check state, set state.
 
Methods inherited from class org.fcrepo.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_HOST_NAME

public static final String PARAMETER_HOST_NAME
See Also:
Constant Field Values

PARAMETER_PORT_NUMBER

public static final String PARAMETER_PORT_NUMBER
See Also:
Constant Field Values

PARAMETER_SERVICE_NAME

public static final String PARAMETER_SERVICE_NAME
See Also:
Constant Field Values

PARAMETER_BUFFER_SIZE

public static final String PARAMETER_BUFFER_SIZE
See Also:
Constant Field Values

DEFAULT_PORT_NUMBER

public static final int DEFAULT_PORT_NUMBER
See Also:
Constant Field Values

DEFAULT_BUFFER_SIZE

public static final int DEFAULT_BUFFER_SIZE
See Also:
Constant Field Values
Constructor Detail

RmiTransport

public RmiTransport(Map<String,String> parameters,
                    boolean crucial,
                    TransportParent parent)
             throws JournalException
Throws:
JournalException

RmiTransport

protected RmiTransport(Map<String,String> parameters,
                       boolean crucial,
                       TransportParent parent,
                       RmiJournalReceiverInterface rx)
                throws JournalException
Throws:
JournalException
Method Detail

openFile

public void openFile(String repositoryHash,
                     String filename,
                     Date currentDate)
              throws JournalException
check state, send the open request, open a very special writer, write the file opening, set state

Specified by:
openFile in class Transport
Throws:
JournalException

getWriter

public XMLEventWriter getWriter()
                         throws JournalException
check state, hand over to the writer

Specified by:
getWriter in class Transport
Throws:
JournalException

closeFile

public void closeFile()
               throws JournalException
check state, write the file closing, close/flush the writer, send the close request, set state.

Specified by:
closeFile in class Transport
Throws:
JournalException

shutdown

public void shutdown()
              throws JournalException
check state, set state. a redundant call is not an error, but requires no action.

Specified by:
shutdown in class Transport
Throws:
JournalException


Copyright © 2012 DuraSpace. All Rights Reserved.