antLogger.logClient
Class ConcreteMessageLogger


public class ConcreteMessageLogger

ConcreteMessageLogger -
In dieser Klasse werden die Meldungen generiert und am NetClient weitergeleitet.

JAVA-Logger antLogger; Projekt der HTA Luzern->Abteilung Informatik->Software Engineering
Authoren Patrick Bründler, Pascal Mengelt, Andy Wyss, Fabian Heusser
Teacher: Jörg Hofstetter
School: hta.fhz.ch, Horw;
Project Homepage: http://www.w3p.ch/antLogger/


LEGAL NOTICE
THIS PROJECT AND ITS FILES ARE COPYRIGHTED BY THE AUTHORS
THIS PROJECT CAN BE COPIED, MODIFIED AND DISTRIBUTED
UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENCE

Author:
Fabian Heusser, Patrick Bründler, Pascal Mengelt, Andy Wyss
Version: 1.0 $Date$ $Revision$

Field Summary
 (package private) SimpleDateFormatformatter
           
 final static StringHIDE_MSG_WNDOW_COMMAND
           
 final static StringSHOW_MSG_WNDOW_COMMAND
           

Method Summary
 static ConcreteMessageLoggergetInstance()
          Get the single instance
 voidhideMsgWindow()
          The Console window will be hidden
 synchronized voidlogMsg(String msg, int type, String objectName, Calendar c)
           
 voidsetName(String name_)
          A instance of the MessageLogger is created.
 voidshowMsgWindow()
          The console window will be shown

Field Detail

formatter

SimpleDateFormat formatter

HIDE_MSG_WNDOW_COMMAND

public final static String HIDE_MSG_WNDOW_COMMAND

SHOW_MSG_WNDOW_COMMAND

public final static String SHOW_MSG_WNDOW_COMMAND
Method Detail

getInstance

public static ConcreteMessageLogger getInstance()
Get the single instance
Returns:

hideMsgWindow

public void hideMsgWindow()
The Console window will be hidden

logMsg

public synchronized void logMsg(String msg, int type, String objectName, Calendar c)
Parameters:
msg
type - INFO, MESSAGE, WARNING or ERROR
objectName - Name of Sender
c - Date and Time of logging
Returns: true if message was logged, false if message couldn't be logged

setName

public void setName(String name_)
A instance of the MessageLogger is created. The user has to give his name which
is his ID.
Parameters:
name

showMsgWindow

public void showMsgWindow()
The console window will be shown