public class StandardProtocoller extends ProtocolModule
Modifier and Type | Class and Description |
---|---|
private class |
StandardProtocoller.DataProtocoller
Gibt bei jeder Aktualisierung zusätzlich die Attributwerte der enthaltenen Datensätze aus.
|
private class |
StandardProtocoller.HeaderProtocoller
Gibt bei jeder Aktualisierung zusätzlich die Köpfe der enthaltenen Datensätze aus.
|
private class |
StandardProtocoller.SilentProtocoller
Keine Ausgabe.
|
private class |
StandardProtocoller.UpdateSummaryProtocoller
Gibt bei jeder Aktualisierung die Anzahl der enthaltenen Datensätze aus.
|
private class |
StandardProtocoller.XmlProtocoller
Gibt die Telegramme in einem XML-Format aus.
|
Modifier and Type | Field and Description |
---|---|
private String |
_actionText
Wird in
StandardProtocoller.UpdateSummaryProtocoller.update(de.bsvrz.dav.daf.main.ResultData[]) als Informationstext ausgegeben |
private static DateFormat |
_dateFormat
Datums-Format
|
private static Object |
_memoryUsage
Objekt, dessen toString Methode Infos über die aktuelle Hauptspeicherverwendung der Applikation zurückgibt.
|
private static DateFormat |
dateFormat
Schreibt String-Format der Zeitstempel vor
|
private static Debug |
debug
Die Debug-Ausgabe
|
private static int |
FOOTER_WRITTEN
Konstante für
state : Es wurde ein Protokollfuß ausgegeben. |
private static int |
HEADER_WRITTEN
Konstante für
state : Es wurde bereits ein Protokollkopf, aber noch kein -fuß ausgegeben. |
private static String |
indentationPrefix
Beschreibt Zeichenkette, die in jeder Zeile pro Einrückungsebene ausgegeben wird
|
private static int |
NO_HEADER_WRITTEN
Konstante für
state : Es wurde noch kein Protokollkopf ausgegeben. |
private long |
resultDataCount
Anzahl der bereits empfangenen Datensätze
|
private int |
state
Zustand des Protokollierers:
state == NO_HEADER_WRITTEN : Ausgangszustand: noch keinen Kopf geschrieben state ==
HEADER_WRITTEN : Kopf wurde ausgegeben. |
private long |
updateCount
Anzahl der Aufrufe von
StandardProtocoller.UpdateSummaryProtocoller.update(de.bsvrz.dav.daf.main.ResultData[]) |
Constructor and Description |
---|
StandardProtocoller()
Erzeugt ein neues Objekt der Klasse
StandardProtocoller mit dem actionText Aktualisierung |
StandardProtocoller(String actionText)
Erzeugt ein neues Objekt der Klasse
StandardProtocoller mit speziellem actionText |
Modifier and Type | Method and Description |
---|---|
void |
closeProtocol()
Führt Aufräumarbeiten nach Beendigung des Standardprotokollierers aus.
|
String |
getHelp()
Gibt Information über die Aufrufparameter des Protokollierungsmoduls zurück
|
protected ArgumentList.ValueSelection |
getProtocollerSelection()
Stellt Liste der bekannten Protokollierer zusammen.
|
ClientReceiverInterface |
initProtocol(ArgumentList argumentList,
PrintWriter protocolFileWriter,
String[] args)
Führt die Initialisierungsschritte des Standardprotokollierers aus.
|
ClientReceiverInterface |
initProtocolWithoutHeader(ArgumentList protocollerArgumentList,
PrintWriter printWriter)
Führt die Initialisierungsschritte des Standardprotokollierers aus.
|
void |
update(ResultData[] results)
Aktualisierungsmethode, die nach Empfang eines angemeldeten Datensatzes vom benutzten Protokollierer aufgerufen wird.
|
getProtocolFileWriter, getProtocoller, setProtocolFileWriter, setProtocoller
private static final Debug debug
private static final DateFormat _dateFormat
private static final DateFormat dateFormat
private static final String indentationPrefix
private static final int NO_HEADER_WRITTEN
state
: Es wurde noch kein Protokollkopf ausgegeben.private static final int HEADER_WRITTEN
state
: Es wurde bereits ein Protokollkopf, aber noch kein -fuß ausgegeben.private static final int FOOTER_WRITTEN
state
: Es wurde ein Protokollfuß ausgegeben.private final String _actionText
StandardProtocoller.UpdateSummaryProtocoller.update(de.bsvrz.dav.daf.main.ResultData[])
als Informationstext ausgegebenprivate long resultDataCount
private int state
state == NO_HEADER_WRITTEN
: Ausgangszustand: noch keinen Kopf geschrieben state ==
HEADER_WRITTEN
: Kopf wurde ausgegeben. Telegramme werden erwartet und Fußtext kann geschrieben werden. state == FOOTER_WRITTEN
: Fuß
wurde ausgegeben. Die Protokollierung ist damit abgeschlossen. Es können keine weiteren Ausgaben folgen. private long updateCount
StandardProtocoller.UpdateSummaryProtocoller.update(de.bsvrz.dav.daf.main.ResultData[])
private static Object _memoryUsage
public StandardProtocoller()
StandardProtocoller
mit dem actionText
Aktualisierungpublic StandardProtocoller(String actionText)
StandardProtocoller
mit speziellem actionText
actionText
- String mit dem gewünschten Ausgabetext bei Aktualisierungenpublic String getHelp()
getHelp
in interface ProtocolModuleInterface
getHelp
in class ProtocolModule
public ClientReceiverInterface initProtocol(ArgumentList argumentList, PrintWriter protocolFileWriter, String[] args)
initProtocol
in interface ProtocolModuleInterface
initProtocol
in class ProtocolModule
argumentList
- ArgumentList
der noch nicht ausgewerteten Aufrufparameter der ApplikationprotocolFileWriter
- PrintWriter der protokollierten Datensequenzenargs
- String[] mit den Kommandozeilenargumentenpublic ClientReceiverInterface initProtocolWithoutHeader(ArgumentList protocollerArgumentList, PrintWriter printWriter)
protocollerArgumentList
- printWriter
- public void update(ResultData[] results)
update
in class ProtocolModule
results
- ResultData
[] mit den empfangenen ErgebnisdatensätzenClientReceiverInterface.update(de.bsvrz.dav.daf.main.ResultData[])
public void closeProtocol()
closeProtocol
in interface ProtocolModuleInterface
closeProtocol
in class ProtocolModule
protected ArgumentList.ValueSelection getProtocollerSelection()
ArgumentList.Argument.asValueCase(de.bsvrz.sys.funclib.commandLineArgs.ArgumentList.ValueSelection)
benutzt werden, um eine der verschiedenen Ausgabeoptionen auszuwählen.