net.larsan.urd.impl
Class DefaultRecord

java.lang.Object
  |
  +--net.larsan.urd.impl.DefaultRecord
All Implemented Interfaces:
Record

public class DefaultRecord
extends java.lang.Object
implements Record

A default record type for the Urd server.

Version:
Alpha-0.1 / 2002-10-06 21:37
Author:
Lars J. Nilsson

Constructor Summary
DefaultRecord()
           
DefaultRecord(java.lang.String id, java.lang.String msg, java.lang.Throwable th)
           
DefaultRecord(java.lang.String msg, java.lang.Throwable th)
           
 
Method Summary
 java.lang.String getId()
          Get record id.
 Level getLevel()
          Get the severity level of the record.
 java.util.Properties getProperties()
          Get a set of record properties.
 java.lang.String getText()
          Get the record overview message.
 java.lang.Throwable getThrowable()
          Get the throwable that triggered this record.
 Type getType()
          Get the type of the record.
 void setId(java.lang.String id)
          Set the record.
 void setLevel(Level level)
          Set the severity level.
 void setText(java.lang.String msg)
          Set the record overview.
 void setThrowable(java.lang.Throwable error)
          Set throwable that caused the record.
 void setType(Type type)
          Set the record type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRecord

public DefaultRecord(java.lang.String id,
                     java.lang.String msg,
                     java.lang.Throwable th)

DefaultRecord

public DefaultRecord(java.lang.String msg,
                     java.lang.Throwable th)

DefaultRecord

public DefaultRecord()
Method Detail

getType

public Type getType()
Description copied from interface: Record
Get the type of the record. This method is allowed to return null, which counts as equals to a Type.UNKNOWN.

Specified by:
getType in interface Record
Returns:
A Record type object, may be null

setType

public void setType(Type type)
Description copied from interface: Record
Set the record type. This method must handle a null argument.

Specified by:
setType in interface Record
Parameters:
type - Record type object, may be null

getId

public java.lang.String getId()
Description copied from interface: Record
Get record id. May return null.

Specified by:
getId in interface Record
Returns:
The record id

setId

public void setId(java.lang.String id)
Description copied from interface: Record
Set the record. May be null.

Specified by:
setId in interface Record
Parameters:
id - Record id

getLevel

public Level getLevel()
Description copied from interface: Record
Get the severity level of the record. If this method returns null it is up to the framework to decide which severity level to asign top the record.

Specified by:
getLevel in interface Record
Returns:
A severity level object, may be null

setLevel

public void setLevel(Level level)
Description copied from interface: Record
Set the severity level. This method must handle a null argument.

Specified by:
setLevel in interface Record
Parameters:
level - Severity level object, may be null

getText

public java.lang.String getText()
Description copied from interface: Record
Get the record overview message. This is equals the the message in ordinary log packages. May retur null if no overview exists.

Specified by:
getText in interface Record
Returns:
A text message for the record

setText

public void setText(java.lang.String msg)
Description copied from interface: Record
Set the record overview. May be null.

Specified by:
setText in interface Record
Parameters:
msg - Record overview message

getThrowable

public java.lang.Throwable getThrowable()
Description copied from interface: Record
Get the throwable that triggered this record. This record may return null if no throwable is available.

Specified by:
getThrowable in interface Record
Returns:
A throwable that caused the record

setThrowable

public void setThrowable(java.lang.Throwable error)
Description copied from interface: Record
Set throwable that caused the record. May be null.

Specified by:
setThrowable in interface Record
Parameters:
error - A throwable that triggered the record

getProperties

public java.util.Properties getProperties()
Description copied from interface: Record
Get a set of record properties. This method will never return null.

Specified by:
getProperties in interface Record
Returns:
Record properties, never null