org.ka2ddo.yaac.core
Class AX25Logger

java.lang.Object
  extended by java.util.TimerTask
      extended by org.ka2ddo.yaac.core.FileLogger<AX25Frame>
          extended by org.ka2ddo.yaac.core.AX25Logger
All Implemented Interfaces:
java.lang.Runnable, ShutdownHandler

public class AX25Logger
extends FileLogger<AX25Frame>

This class batches up logging AX.25 messages. By default, it logs in CSV format.


Constructor Summary
AX25Logger(java.lang.String prefix)
           
 
Method Summary
 void dumpRecordQueueToFile(java.io.File logFileFile, java.util.ArrayList<AX25Frame> recordQueue)
          Opens the specified sequential file for append, then write each of the AX.25 records in the recordQueue in order to the file, then close the file.
 PacketExportMode getLogFileFormat()
          Get the current logging file format for the packets.
 void setLogFileFormat(PacketExportMode pem)
          Change the logging file format for the packets.
 
Methods inherited from class org.ka2ddo.yaac.core.FileLogger
flush, log, log, log, run, setDatePattern, setDefaultLogDir, setFilePrefix, setFileSuffix, setFlushInterval, setLogDirectory, shutdown
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AX25Logger

public AX25Logger(java.lang.String prefix)
Method Detail

getLogFileFormat

public PacketExportMode getLogFileFormat()
Get the current logging file format for the packets.

Returns:
PacketExportMode to be used

setLogFileFormat

public void setLogFileFormat(PacketExportMode pem)
Change the logging file format for the packets.

Parameters:
pem - PacketExportMode to be used

dumpRecordQueueToFile

public void dumpRecordQueueToFile(java.io.File logFileFile,
                                  java.util.ArrayList<AX25Frame> recordQueue)
                           throws java.io.IOException
Opens the specified sequential file for append, then write each of the AX.25 records in the recordQueue in order to the file, then close the file.

Specified by:
dumpRecordQueueToFile in class FileLogger<AX25Frame>
Parameters:
logFileFile - File identifying the log file to open and write
recordQueue - the ArrayList of ordered records to write
Throws:
java.io.IOException - if record saving fails for any reason