Top Description Fields Constructors Methods
org.apache.log

public final Class Priority

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.Serializable

Class representing and holding constants for priority.
Author
Peter Donald

Field Summary

Modifier and TypeField and Description
public static final Priority
DEBUG

Developer orientated messages, usually used during development of product.

public static final Priority
ERROR

A problem has occurred but it is not fatal.

public static final Priority
FATAL_ERROR

Something caused whole system to fail.

public static final Priority
INFO

Useful information messages such as state changes, client connection, user login etc.

private final String
private final int
public static final Priority
NONE

Do not log anything.

public static final Priority
WARN

A problem or conflict has occurred but it may be recoverable, then again it could be the start of the system failing.

Constructor Summary

AccessConstructor and Description
private
Priority(final String
the string name of priority
name
,
final int
the numerical code of priority
priority
)

Private Constructor to block instantiation outside class.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the priorities name
getName
()

Get name of priority.

public static Priority

Returns:

the Priority for name
getPriorityForName
(final String
the priority name
priority
)

Retrieve a Priority object for the name parameter.

public int

Returns:

the numerical value
getValue
()

Get numerical value associated with priority.

public boolean

Returns:

TRUE if the priority is greater else FALSE
isGreater
(final Priority
the other Priority
other
)

Test whether this priority is greater than other priority.

public boolean

Returns:

TRUE if the priority is lower else FALSE
isLower
(final Priority
the other Priority
other
)

Test whether this priority is lower than other priority.

public boolean

Returns:

TRUE if the priority is lower or equal else FALSE
isLowerOrEqual
(final Priority
the other Priority
other
)

Test whether this priority is lower or equal to other priority.

private Object

Returns:

the singleton version of object
readResolve
()

Helper method that replaces deserialized object with correct singleton.

public String

Returns:

the string describing priority
toString
()

Overrides java.lang.Object.toString.

Overidden string to display Priority in human readable form.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

DEBUGback to summary
public static final Priority DEBUG

Developer orientated messages, usually used during development of product.

ERRORback to summary
public static final Priority ERROR

A problem has occurred but it is not fatal. The system will still function.

FATAL_ERRORback to summary
public static final Priority FATAL_ERROR

Something caused whole system to fail. This indicates that an administrator should restart the system and try to fix the problem that caused the failure.

INFOback to summary
public static final Priority INFO

Useful information messages such as state changes, client connection, user login etc.

m_nameback to summary
private final String m_name
m_priorityback to summary
private final int m_priority
NONEback to summary
public static final Priority NONE

Do not log anything.

WARNback to summary
public static final Priority WARN

A problem or conflict has occurred but it may be recoverable, then again it could be the start of the system failing.

Constructor Detail

Priorityback to summary
private Priority(final String name, final int priority)

Private Constructor to block instantiation outside class.

Parameters
name:String

the string name of priority

priority:int

the numerical code of priority

Method Detail

getNameback to summary
public String getName()

Get name of priority.

Returns:String

the priorities name

getPriorityForNameback to summary
public static Priority getPriorityForName(final String priority)

Retrieve a Priority object for the name parameter.

Parameters
priority:String

the priority name

Returns:Priority

the Priority for name

getValueback to summary
public int getValue()

Get numerical value associated with priority.

Returns:int

the numerical value

isGreaterback to summary
public boolean isGreater(final Priority other)

Test whether this priority is greater than other priority.

Parameters
other:Priority

the other Priority

Returns:boolean

TRUE if the priority is greater else FALSE

isLowerback to summary
public boolean isLower(final Priority other)

Test whether this priority is lower than other priority.

Parameters
other:Priority

the other Priority

Returns:boolean

TRUE if the priority is lower else FALSE

isLowerOrEqualback to summary
public boolean isLowerOrEqual(final Priority other)

Test whether this priority is lower or equal to other priority.

Parameters
other:Priority

the other Priority

Returns:boolean

TRUE if the priority is lower or equal else FALSE

readResolveback to summary
private Object readResolve()

Helper method that replaces deserialized object with correct singleton.

Returns:Object

the singleton version of object

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Overidden string to display Priority in human readable form.

Returns:String

the string describing priority