public class ProtocolOutputStream
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static Debug |
_debug
Debug-Ausgabe.
|
private java.io.ObjectOutputStream |
_oos
Stream zum Schreiben des Protokolls.
|
private java.lang.String |
_path
Verzeichnis, in dem das Protokoll abgelegt werden soll.
|
private long |
_protocolId
Protokoll-Id
|
private int |
_quota
Minimaler verbleibender Speicherplatz auf dem Datenträgern (in MB)
|
static java.lang.String |
PROTOCOL_FILENAME_EXTENSION
Dateiendung von gespeicherten Protokollen.
|
static java.lang.String |
PROTOCOL_FRAGMENT_EXTENSION
Dateiendung von unvollständigen Protokollen.
|
static java.lang.String |
PROTOCOL_NOT_READ_YET
Dateiendung von nicht abgerufenen Protokollen.
|
Constructor and Description |
---|
ProtocolOutputStream(long protocolId,
java.lang.String path,
ProcessingParameter pp,
int quota)
Legt legt eine Datei an, in der ein Protokoll abgelegt wird.
|
Modifier and Type | Method and Description |
---|---|
void |
abortWriting()
Schliesst den Stream und löscht das Protokoll vom Datenträger.
|
void |
appendData(ProtocolResult data)
Schreibt einen Protokolldatensatz in einem Stream.
|
void |
close()
Schließen des Streams.
|
private void |
close(boolean successful)
Schliessen des Streams.
|
void |
closeClientQuit()
Schliessen des Streams.
|
(package private) static void |
renameProtocol(java.io.File sourceFile,
java.io.File destFile)
Benennt eine Protokoll-Datei um.
|
public static final java.lang.String PROTOCOL_FILENAME_EXTENSION
public static final java.lang.String PROTOCOL_FRAGMENT_EXTENSION
public static final java.lang.String PROTOCOL_NOT_READ_YET
private static final Debug _debug
private java.io.ObjectOutputStream _oos
private long _protocolId
private java.lang.String _path
private int _quota
public ProtocolOutputStream(long protocolId, java.lang.String path, ProcessingParameter pp, int quota) throws NoncriticalException
protocolId
- protocolId für die Datei, in die geschrieben werden soll.path
- Verzeichnis, in dem das Protokoll abgelegt werden soll. Muss auf File.separator
enden.pp
- Auftragsparameter.quota
- Minimaler verbleibender Speicherplatz auf dem Datenträgern (in MB)NoncriticalException
- Die Datei kann nicht angelegt werden; Fehler beim Schreiben der Protokollinformationen.public void appendData(ProtocolResult data) throws NoncriticalException
data
- DatensatzNoncriticalException
- Fehlermeldungpublic void close() throws NoncriticalException
PROTOCOL_FILENAME_EXTENSION
falls alle Ergebnisdatensätze geschrieben wurden.NoncriticalException
- Fehler.private void close(boolean successful) throws NoncriticalException
PROTOCOL_FILENAME_EXTENSION
falls alle Ergebnisdatensätze geschrieben wurden.successful
- true
wenn alle Ergebnisdatensätze geschrieben wurden. false
sonst.NoncriticalException
- Fehler.public void closeClientQuit() throws NoncriticalException
PROTOCOL_NOT_READ_YET
NoncriticalException
- Fehler.static void renameProtocol(java.io.File sourceFile, java.io.File destFile) throws NoncriticalException
sourceFile
- destFile
- NoncriticalException
- Fehler beim umbenennen.public void abortWriting() throws NoncriticalException
NoncriticalException
- Datei konnte nicht gelöscht werden.