|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.server.logging.logviewer.backend.LogFile
public class LogFile
This class encapsulates the log file so that its details are not exposed. "getLongEntries" returns an unfiltered List of LogEntry objects from the requested record number. It will always search forward. getIndexSize() returns the number of records between each index. getLastIndexNumber returns the last index.
| Nested Class Summary | |
|---|---|
class |
LogFile.LogEntry
Class to manage LogEntry information |
| Field Summary | |
|---|---|
static java.lang.String |
FIELD_SEPARATOR
|
static java.lang.String |
RECORD_BEGIN_MARKER
|
static java.lang.String |
RECORD_END_MARKER
|
| Constructor Summary | |
|---|---|
LogFile(java.lang.String name)
Constructor |
|
| Method Summary | |
|---|---|
protected void |
buildLogFileIndex()
This method builds the file index in the beginning. |
protected java.io.BufferedReader |
getFilePosition(long recordNumber)
This method returns the file position given the record number. |
long |
getIndexSize()
|
long |
getLastIndexNumber()
The log records are indexed, this method returns the last index. |
java.util.List |
getLogEntries(long startingRecord)
This method returns up to _indexSize records starting with the given record number. |
java.util.List |
getLogEntries(long startingRecord,
long maxRecords)
This method returns up to _indexSize records starting with the given record number. |
java.lang.String |
getLogFileName()
|
protected java.io.BufferedReader |
getLogFileReader(long fromFilePosition)
This method opens the server.log file and moves the stream to the specified filePosition. |
void |
setIndexSize(long indexSize)
The number of records between indexes. |
void |
setLogFileName(java.lang.String filename)
|
| 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.String RECORD_BEGIN_MARKER
public static final java.lang.String RECORD_END_MARKER
public static final java.lang.String FIELD_SEPARATOR
| Constructor Detail |
|---|
public LogFile(java.lang.String name)
| Method Detail |
|---|
public java.util.List getLogEntries(long startingRecord)
startingRecord - The starting point to search for LogEntries
public java.util.List getLogEntries(long startingRecord,
long maxRecords)
startingRecord - The starting point to search for LogEntriesmasRecords - The maximum number of records to returnprotected void buildLogFileIndex()
protected java.io.BufferedReader getFilePosition(long recordNumber)
recordNumber - The Record Number
protected java.io.BufferedReader getLogFileReader(long fromFilePosition)
public java.lang.String getLogFileName()
public void setLogFileName(java.lang.String filename)
public long getLastIndexNumber()
public long getIndexSize()
public void setIndexSize(long indexSize)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||