de.danet.an.workflow.api
Class PrioritizedMessage.Priority

java.lang.Object
  extended byde.danet.an.workflow.api.PrioritizedMessage.Priority
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable
Enclosing class:
PrioritizedMessage

public static class PrioritizedMessage.Priority
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

This class represents the priority of a given message. It was taken over from org.apache.log4j.Priority to avoid the dependence of the log4j library.

See Also:
Serialized Form

Field Summary
static PrioritizedMessage.Priority DEBUG
          The DEBUG priority designates fine-grained informational events that are most useful to debug an application.
static PrioritizedMessage.Priority ERROR
          The ERROR level designates error events that might still allow the application to continue running.
static PrioritizedMessage.Priority FATAL
          The FATAL level designates very severe error events that will presumably lead the application to abort.
static PrioritizedMessage.Priority INFO
          The INFO level designates informational messages that highlight the progress of the application at coarse-grained level.
static PrioritizedMessage.Priority WARN
          The WARN level designates potentially harmful situations.
 
Constructor Summary
protected PrioritizedMessage.Priority(int level, java.lang.String levelStr)
          Constructor of the priority of a message.
 
Method Summary
 int compareTo(java.lang.Object other)
          Implements Comparable.
 java.lang.String toString()
          Returns the string representation of this priority.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

public static final PrioritizedMessage.Priority DEBUG
The DEBUG priority designates fine-grained informational events that are most useful to debug an application.


INFO

public static final PrioritizedMessage.Priority INFO
The INFO level designates informational messages that highlight the progress of the application at coarse-grained level.


WARN

public static final PrioritizedMessage.Priority WARN
The WARN level designates potentially harmful situations.


ERROR

public static final PrioritizedMessage.Priority ERROR
The ERROR level designates error events that might still allow the application to continue running.


FATAL

public static final PrioritizedMessage.Priority FATAL
The FATAL level designates very severe error events that will presumably lead the application to abort.

Constructor Detail

PrioritizedMessage.Priority

protected PrioritizedMessage.Priority(int level,
                                      java.lang.String levelStr)
Constructor of the priority of a message.

Parameters:
level - the level of the priority.
levelStr - the string representation of the priority.
Method Detail

toString

public java.lang.String toString()
Returns the string representation of this priority.

Returns:
this priority in string.

compareTo

public int compareTo(java.lang.Object other)
Implements Comparable.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
other - priority to compare with.
Returns:
a negative integer, zero, or a positive integer as this priority is less than, equal to, or greater than the given priority.