net.sourceforge.esw.service.log
Class DefaultLogDatum

java.lang.Object
  |
  +--net.sourceforge.esw.service.log.DefaultLogDatum
All Implemented Interfaces:
ILogDatum, java.io.Serializable

public class DefaultLogDatum
extends java.lang.Object
implements ILogDatum

Describes an instance of logged data, used by an ILog instance to log data.

This is an concrete implementor of the ILogDatum.

Using this interface is the perferred way to log data into an ILog instance. The allows the ILog instance to know exactly where to get all the info it needs to log data.

See Also:
Serialized Form

Field Summary
protected  INode complexWhat
          Complex caputured state of the event that occured
protected  long id
          Unique Id of this datum
protected  int importance
          How important was the event that occured
protected  java.lang.String simpleWhat
          Simply, what was the event that occured
protected  java.util.Date when
          When the event occured
protected  java.lang.String where
          Where the event occured
protected  java.lang.String who
          Who the event occured with
 
Constructor Summary
protected DefaultLogDatum(java.util.Date aWhen, java.lang.String aWhere, int aImportance, java.lang.String aSimpleWhat, INode aComplexWhat, java.lang.String aWho, long aId)
          Creates a new DefaultLogDatum.
 
Method Summary
 java.lang.String getApplicationID()
          Returns the identifier for the type of data being logged via this ILogDatum instance.
 INode getData()
          Returns the INote instance that represents the data to be logged via this ILogDatum instance.
 long getDatumID()
          Returns a unique id for this LogDatum Instance.
 java.lang.String getDescription()
          Returns the String description of this ILogDatum instance.
 int getRank()
          Returns the rank of this ILogDatum instance's data to be used to consider priority amongst more than one ILogDatum instance.
 java.util.Date getWhen()
          Returns when this ILogDatum instance's data was considered to have occured at for logging purposes.
 java.lang.String getWhere()
          Returns where this ILogDatum instance's data was considered to have occured for logging purposes.
 java.lang.String toString()
          Returns a string representation of this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

when

protected java.util.Date when
When the event occured

where

protected java.lang.String where
Where the event occured

importance

protected int importance
How important was the event that occured

simpleWhat

protected java.lang.String simpleWhat
Simply, what was the event that occured

complexWhat

protected INode complexWhat
Complex caputured state of the event that occured

who

protected java.lang.String who
Who the event occured with

id

protected long id
Unique Id of this datum
Constructor Detail

DefaultLogDatum

protected DefaultLogDatum(java.util.Date aWhen,
                          java.lang.String aWhere,
                          int aImportance,
                          java.lang.String aSimpleWhat,
                          INode aComplexWhat,
                          java.lang.String aWho,
                          long aId)
Creates a new DefaultLogDatum.

Parameters:
aWhen - when the event occured
aWhere - Where the event occured
aImportance - How important was the event that occured
aSimpleWhat - Simply, what was the event that occured
aComplexWhat - Complex caputured state of the event that occured
aWho - Who the event occured with
aId - Id of this unique Datum
Method Detail

getWhen

public java.util.Date getWhen()
Returns when this ILogDatum instance's data was considered to have occured at for logging purposes. This is the when of the logged data.
Specified by:
getWhen in interface ILogDatum
Returns:
when the datum occured

getWhere

public java.lang.String getWhere()
Returns where this ILogDatum instance's data was considered to have occured for logging purposes. This is the where of the logged data.
Specified by:
getWhere in interface ILogDatum
Returns:
where the datum occured

getRank

public int getRank()
Returns the rank of this ILogDatum instance's data to be used to consider priority amongst more than one ILogDatum instance. This is the importance of the logged data.
Specified by:
getRank in interface ILogDatum
Returns:
the priority of this datum

getDescription

public java.lang.String getDescription()
Returns the String description of this ILogDatum instance. This is the simple what of the logged data.
Specified by:
getDescription in interface ILogDatum
Returns:
the String description of this ILogDatum instance.

getData

public INode getData()
Returns the INote instance that represents the data to be logged via this ILogDatum instance. This is the complex what of the logged data.
Specified by:
getData in interface ILogDatum
Returns:
the data of this ILogDataum instance.

getApplicationID

public java.lang.String getApplicationID()
Returns the identifier for the type of data being logged via this ILogDatum instance. This is the who of the logged data.
Specified by:
getApplicationID in interface ILogDatum
Returns:
the ID of the Application logging the data.

getDatumID

public long getDatumID()
Returns a unique id for this LogDatum Instance. Unique across all VMs
Specified by:
getDatumID in interface ILogDatum
Returns:
the id of this datum

toString

public java.lang.String toString()
Returns a string representation of this object
Overrides:
toString in class java.lang.Object
Returns:
a string representation of this object


Copyright 2002 Free Software Foundation. All Rights Reserved.