org.jwall.log
Class LogMessageImpl

java.lang.Object
  extended by org.jwall.log.LogMessageImpl
All Implemented Interfaces:
Serializable, Event, LogMessage

public class LogMessageImpl
extends Object
implements LogMessage

A simple implementation of the LogMessage interface.

Author:
Christian Bockermann <chris@jwall.org>
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.jwall.log.LogMessage
LOG_LEVEL, MESSAGE, SOURCE
 
Fields inherited from interface org.jwall.audit.Event
TIMESTAMP, TYPE
 
Constructor Summary
LogMessageImpl(EventType type, Long timestamp, String source, String msg)
           
 
Method Summary
 String get(String variable)
          This method returns the specified aspect for the given event.
 String getMessage()
           
 String getSource()
           
 Long getTimestamp()
          Returns the time of this event in milliseconds since 1970.
 EventType getType()
           
 void set(String variable, String val)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogMessageImpl

public LogMessageImpl(EventType type,
                      Long timestamp,
                      String source,
                      String msg)
Method Detail

getType

public EventType getType()
Specified by:
getType in interface Event
Returns:
the type

getMessage

public String getMessage()
Specified by:
getMessage in interface LogMessage
Returns:
the message
See Also:
LogMessage.getMessage()

getSource

public String getSource()
Specified by:
getSource in interface LogMessage
Returns:
the source
See Also:
LogMessage.getSource()

getTimestamp

public Long getTimestamp()
Description copied from interface: Event
Returns the time of this event in milliseconds since 1970.

Specified by:
getTimestamp in interface Event
Returns:
See Also:
Event.getTimestamp()

toString

public String toString()
Overrides:
toString in class Object

get

public String get(String variable)
Description copied from interface: Event
This method returns the specified aspect for the given event.

Specified by:
get in interface Event
Specified by:
get in interface LogMessage
Returns:

set

public void set(String variable,
                String val)
Specified by:
set in interface Event
Specified by:
set in interface LogMessage


Copyright © 2012 jwall.org. All Rights Reserved.