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.
Transport.State| Modifier and Type | Field and Description |
|---|---|
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 |
crucial, parameters, parent| Modifier | Constructor and Description |
|---|---|
|
RmiTransport(Map<String,String> parameters,
boolean crucial,
TransportParent parent) |
protected |
RmiTransport(Map<String,String> parameters,
boolean crucial,
TransportParent parent,
RmiJournalReceiverInterface rx) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
getState, isCrucial, setState, testStateChange, testWriterStatepublic static final String PARAMETER_HOST_NAME
public static final String PARAMETER_PORT_NUMBER
public static final String PARAMETER_SERVICE_NAME
public static final String PARAMETER_BUFFER_SIZE
public static final int DEFAULT_PORT_NUMBER
public static final int DEFAULT_BUFFER_SIZE
public RmiTransport(Map<String,String> parameters, boolean crucial, TransportParent parent) throws JournalException
JournalExceptionprotected RmiTransport(Map<String,String> parameters, boolean crucial, TransportParent parent, RmiJournalReceiverInterface rx) throws JournalException
JournalExceptionpublic void openFile(String repositoryHash, String filename, Date currentDate) throws JournalException
openFile in class TransportJournalExceptionpublic XMLEventWriter getWriter() throws JournalException
getWriter in class TransportJournalExceptionpublic void closeFile()
throws JournalException
closeFile in class TransportJournalExceptionpublic void shutdown()
throws JournalException
shutdown in class TransportJournalExceptionCopyright © 2013 DuraSpace. All Rights Reserved.