FileDocCategorySizeDatePackage
Reporter.javaAPI DocGlassfish v2 API13761Fri May 04 22:32:14 BST 2007com.sun.enterprise.util.diagnostics

Reporter

public class Reporter extends Object implements IReporterEnum
Wrapper class for ReporterImpl(s) Will create & track ReporterImpl's if desired provides an easy-to-type selection of static methods for calling the default reporter

Fields Summary
static Logger
_logger
private static ReporterImpl
defaultReporter
private static final boolean
doDebug
Constructors Summary
protected Reporter()

	
Methods Summary
public static voidcrit(java.lang.Object o)

see
verbose(Object)

		getDefaultReporter().crit(o);
	
public static voidcritical(java.lang.Object o)

see
verbose(Object)

		getDefaultReporter().critical(o);
	
private static voiddebug(java.lang.String s)

		if(doDebug)
//Bug 4677074			System.err.println(s);
//Bug 4677074 begin
			_logger.log(Level.WARNING,s);
//Bug 4677074 end
	
public static voiddump(java.lang.Object o, java.lang.String s)
Dump information via the Reporter about an object

param
o The object to dump information about.
param
s A string to preceed the object dump

		getDefaultReporter().dump(o, s);
	
public static voiddump(java.lang.String s)
Print a string at "DUMP" severity level

param
s The message to report.

		getDefaultReporter().dump(s);
	
public static voiddump(java.lang.Object o)
Dump an object, with no "extra string" associated with the output.

param
o The object to dump

		getDefaultReporter().dump(o);
	
public static voiderror(java.lang.Object o)

see
verbose(Object)

		getDefaultReporter().error(o);
	
public static ReporterImplget()
Gain access to the default ReporterImpl object.

return
The default ReporterImpl object.

//Bug 4677074 end

                         
	   
	
		return getDefaultReporter();
	
private static ReporterImplgetDefaultReporter()

		if(defaultReporter == null)
		{
//Bug 4677074 			System.err.println("Internal Error in Reporter -- couldn't find default reporter!");//NOI18N
//Bug 4677074 begin
			_logger.log(Level.WARNING,"iplanet_util.internal_error");
//Bug 4677074 end
			defaultReporter = new ReporterImpl();
		}

		return defaultReporter;
	
public static intgetSeverityLevel()
Determine the current severity level.

return
the severity levels integer value.

		return getDefaultReporter().getSeverityLevel();
	
public static java.lang.StringgetSeverityLevelString()
Determine the current severity level.

return
the severity levels String value.

		return getDefaultReporter().getSeverityLevelString();
	
public static voidinfo(java.lang.Object o)

see
verbose(Object)

		getDefaultReporter().info(o);
	
public static voidinsist(java.lang.String s)
Provide an insist mechanism. The assertion will be checked if the severity level is set to ASSERT or lower.

param
s The assertion will fail and cause a message and throw a run-time exception is the argument is null or is zero length.

		getDefaultReporter().insist(s);
	
public static voidinsist(java.lang.String checkme, java.lang.String s)
Provide an insist mechanism. The assertion will be checked if the severity level is set to ASSERT or lower.

param
checkme The assertion will fail and cause a message and throw a run-time exception is the argument is null or is zero length.
param
s Additional information to add to the assertion's text message.

		getDefaultReporter().insist(checkme, s);
	
public static voidinsist(boolean b)

see
insist(String)

		getDefaultReporter().insist(b);
	
public static voidinsist(boolean b, java.lang.String s)

see
insist(String,String)

		getDefaultReporter().insist(b, s);
	
public static voidinsist(java.lang.Object o)

see
insist(String)

		getDefaultReporter().insist(o);
	
public static voidinsist(java.lang.Object o, java.lang.String s)

see
insist(String,String)

		getDefaultReporter().insist(o, s);
	
public static voidinsist(double z)

see
insist(String)

		getDefaultReporter().insist(z);
	
public static voidinsist(double z, java.lang.String s)

see
insist(String,String)

		getDefaultReporter().insist(z, s);
	
public static voidinsist(long l)

see
insist(String)

		getDefaultReporter().insist(l);
	
public static voidinsist(long l, java.lang.String s)

see
insist(String,String)

		getDefaultReporter().insist(l, s);
	
public static voidsetSeverityLevel(int level)
Change the message severity level that will trigger output

param
level The verbosity increases as the level decresses. The value 1000 shutdown the Reporter.

		getDefaultReporter().setSeverityLevel(level);
	
public static voidsetSeverityLevel(java.lang.String level)
Change the message severity level that will trigger output

param
level A textual description of the severity level. Key values include: ALL,NOISY,EVERYTHING,ON",MONDO,YES,TRUE,DUMP,MAX [which turn the message volume up] and NO,OFF,FALSE,QUIET,MIN [which turn the volume down] as well as the sveroty level names. return DISABLED;

		getDefaultReporter().setSeverityLevel(level);
	
public static voidverbose(java.lang.Object o)
Messages output at the lowest severity level.

param
o The text of the message will be the output of this object's toString()

		getDefaultReporter().verbose(o);
	
public static voidwarn(java.lang.Object o)

see
verbose(Object)

		getDefaultReporter().warn(o);
	
public static voidwarning(java.lang.Object o)

see
verbose(Object)

		getDefaultReporter().warning(o);