org.ow2.jonas.commands.admin.util
Class PrintUtils

java.lang.Object
  extended by org.ow2.jonas.commands.admin.util.PrintUtils

public class PrintUtils
extends Object

This utility class is responsible of keeping logs coherents. Should be used to display informative messages to the user.


Constructor Summary
PrintUtils()
           
 
Method Summary
static void error(String message)
          Print an error type message (prefixed with [ERROR]) on the System.err PrintStream.
static void error(String message, Throwable exception)
          Print an error type message (prefixed with [ERROR]) on the System.err PrintStream and then print the cause' message of the given exception.
static void failure(String message)
          Print a failure type message (prefixed with [FAILURE]) on the System.err PrintStream.
static void failure(String message, Throwable exception)
          Print a failure type message (prefixed with [FAILURE]) on the System.err PrintStream and then print the cause' message of the given exception.
static void println(String message)
          Print a message on the System.out PrintStream.
static void println(String message, PrintStream stream)
          Print a message on the given PrintStream.
static void println(Throwable exception)
          Print the given Throwable on the System.err PrintStream.
static void println(Throwable exception, PrintStream stream)
          Print the given Throwable on the given PrintStream.
static void success(String message)
          Print a success type message (prefixed with [SUCCESS]) on the System.out PrintStream.
static void warning(String message)
          Print a success type message (prefixed with [SUCCESS]) on the System.out PrintStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintUtils

public PrintUtils()
Method Detail

println

public static void println(String message,
                           PrintStream stream)
Print a message on the given PrintStream.

Parameters:
message - displayed message
stream - PrintStream used to print the message

println

public static void println(String message)
Print a message on the System.out PrintStream.

Parameters:
message - displayed message

println

public static void println(Throwable exception,
                           PrintStream stream)
Print the given Throwable on the given PrintStream.

Parameters:
exception - displayed exception
stream - PrintStream used to print the message

println

public static void println(Throwable exception)
Print the given Throwable on the System.err PrintStream.

Parameters:
exception - displayed exception

warning

public static void warning(String message)
Print a success type message (prefixed with [SUCCESS]) on the System.out PrintStream.

Parameters:
message - displayed message

success

public static void success(String message)
Print a success type message (prefixed with [SUCCESS]) on the System.out PrintStream.

Parameters:
message - displayed message

failure

public static void failure(String message)
Print a failure type message (prefixed with [FAILURE]) on the System.err PrintStream.

Parameters:
message - displayed message

failure

public static void failure(String message,
                           Throwable exception)
Print a failure type message (prefixed with [FAILURE]) on the System.err PrintStream and then print the cause' message of the given exception.

Parameters:
message - displayed message
exception - Displayed exception

error

public static void error(String message)
Print an error type message (prefixed with [ERROR]) on the System.err PrintStream.

Parameters:
message - displayed message

error

public static void error(String message,
                         Throwable exception)
Print an error type message (prefixed with [ERROR]) on the System.err PrintStream and then print the cause' message of the given exception.

Parameters:
message - displayed message
exception - Throwable


Copyright © 2010 OW2 Consortium. All Rights Reserved.