[jboss-svn-commits] JBoss Common SVN: r3401 - common-logging-spi/trunk/src/main/java/org/jboss/logging.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Jul 29 17:17:34 EDT 2009
Author: david.lloyd at jboss.com
Date: 2009-07-29 17:17:34 -0400 (Wed, 29 Jul 2009)
New Revision: 3401
Removed:
common-logging-spi/trunk/src/main/java/org/jboss/logging/DynamicLogger.java
Modified:
common-logging-spi/trunk/src/main/java/org/jboss/logging/AbstractLoggerPluginInstance.java
common-logging-spi/trunk/src/main/java/org/jboss/logging/Logger.java
common-logging-spi/trunk/src/main/java/org/jboss/logging/LoggerPlugin.java
common-logging-spi/trunk/src/main/java/org/jboss/logging/LoggerPluginInstance.java
common-logging-spi/trunk/src/main/java/org/jboss/logging/MDC.java
common-logging-spi/trunk/src/main/java/org/jboss/logging/MDCProvider.java
common-logging-spi/trunk/src/main/java/org/jboss/logging/MDCSupport.java
common-logging-spi/trunk/src/main/java/org/jboss/logging/NDC.java
common-logging-spi/trunk/src/main/java/org/jboss/logging/NDCProvider.java
common-logging-spi/trunk/src/main/java/org/jboss/logging/NDCSupport.java
common-logging-spi/trunk/src/main/java/org/jboss/logging/NullLoggerPlugin.java
common-logging-spi/trunk/src/main/java/org/jboss/logging/NullLoggerPluginInstance.java
common-logging-spi/trunk/src/main/java/org/jboss/logging/NullNDCProvider.java
Log:
Refactor to reuse logger instances always and complete i18n support for those logger backends which support it
Modified: common-logging-spi/trunk/src/main/java/org/jboss/logging/AbstractLoggerPluginInstance.java
===================================================================
--- common-logging-spi/trunk/src/main/java/org/jboss/logging/AbstractLoggerPluginInstance.java 2009-07-29 21:17:18 UTC (rev 3400)
+++ common-logging-spi/trunk/src/main/java/org/jboss/logging/AbstractLoggerPluginInstance.java 2009-07-29 21:17:34 UTC (rev 3401)
@@ -22,37 +22,54 @@
package org.jboss.logging;
+import java.text.MessageFormat;
+
/**
* An abstract base class for logger plugin instances.
*/
public abstract class AbstractLoggerPluginInstance implements LoggerPluginInstance {
- public void tracef(String loggerFcqn, Object message, Object[] params, Throwable t) {
- if (isTraceEnabled()) {
- trace(loggerFcqn, String.format(String.valueOf(message), params), null, t);
- }
+
+ private final Logger logger;
+
+ /**
+ * Construct a new instance.
+ *
+ * @param name the logger name
+ * @param resourceBundleName the resource bundle name
+ */
+ protected AbstractLoggerPluginInstance(final String name, final String resourceBundleName) {
+ //noinspection ThisEscapedInObjectConstruction
+ logger = new Logger(name, resourceBundleName, this);
}
- public void debugf(String loggerFcqn, Object message, Object[] params, Throwable t) {
- if (isDebugEnabled()) {
- debug(loggerFcqn, String.format(String.valueOf(message), params), null, t);
- }
+ /** {@inheritDoc} */
+ public Logger getLogger() {
+ return logger;
}
- public void infof(String loggerFcqn, Object message, Object[] params, Throwable t) {
- if (isInfoEnabled()) {
- info(loggerFcqn, String.format(String.valueOf(message), params), null, t);
+ /** {@inheritDoc} */
+ public void logf(final Logger.Level level, final String loggerFqcn, final String format, final Object[] params, final Throwable t) {
+ if (isEnabled(level)) {
+ log(level, loggerFqcn, params == null || params.length == 0 ? format : String.format(String.valueOf(format), params), t);
}
}
- public void warnf(String loggerFcqn, Object message, Object[] params, Throwable t) {
- warn(loggerFcqn, String.format(String.valueOf(message), params), null, t);
+ /** {@inheritDoc} */
+ public void log(final Logger.Level level, final String loggerFqcn, final Object message, final Object[] params, final Throwable t) {
+ if (isEnabled(level)) {
+ final String msgStr = String.valueOf(message);
+ log(level, loggerFqcn, params == null || params.length == 0 ? msgStr : MessageFormat.format(msgStr, params), t);
+ }
}
- public void errorf(String loggerFcqn, Object message, Object[] params, Throwable t) {
- error(loggerFcqn, String.format(String.valueOf(message), params), null, t);
+ /**
+ * Simple log method. Implemented by logger plugins which do not have any special formatting support.
+ *
+ * @param level the level
+ * @param loggerFqcn the logger class name
+ * @param message the log message
+ * @param t the throwable cause
+ */
+ protected void log(final Logger.Level level, final String loggerFqcn, final String message, final Throwable t) {
}
-
- public void fatalf(String loggerFcqn, Object message, Object[] params, Throwable t) {
- fatal(loggerFcqn, String.format(String.valueOf(message), params), null, t);
- }
}
Deleted: common-logging-spi/trunk/src/main/java/org/jboss/logging/DynamicLogger.java
===================================================================
--- common-logging-spi/trunk/src/main/java/org/jboss/logging/DynamicLogger.java 2009-07-29 21:17:18 UTC (rev 3400)
+++ common-logging-spi/trunk/src/main/java/org/jboss/logging/DynamicLogger.java 2009-07-29 21:17:34 UTC (rev 3401)
@@ -1,265 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.logging;
-
-/**
- * An extension of the JBoss Logger that adds a log()
- * primitive that maps to a dynamically defined log level.
- *
- * TODO - Make sure serialization works correctly
- *
- * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
- * @version <tt>$Revision$</tt>
- *
- * @since 4.0.3
- */
-public class DynamicLogger extends Logger
-{
- /** The serialVersionUID */
- private static final long serialVersionUID = -5963699806863917370L;
-
- /** No logging */
- public static final int LOG_LEVEL_NONE = 0;
-
- /** Fatal level logging */
- public static final int LOG_LEVEL_FATAL = 1;
-
- /** Error level logging */
- public static final int LOG_LEVEL_ERROR = 2;
-
- /** Warn level logging */
- public static final int LOG_LEVEL_WARN = 3;
-
- /** Info level logging */
- public static final int LOG_LEVEL_INFO = 4;
-
- /** Debug level logging */
- public static final int LOG_LEVEL_DEBUG = 5;
-
- /** Trace level logging */
- public static final int LOG_LEVEL_TRACE = 6;
-
- /** The available log level strings */
- public final static String[] LOG_LEVEL_STRINGS =
- { "NONE", "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE" };
-
- /** The log level to use for the "log" primitive */
- private int logLevel = LOG_LEVEL_DEBUG;
-
- /**
- * Create a DynamicLogger instance given the logger name.
- *
- * @param name the logger name
- * @return the dynamic logger
- */
- public static DynamicLogger getDynamicLogger(String name)
- {
- return new DynamicLogger(name);
- }
-
- /**
- * Create a DynamicLogger instance given the logger name with the given suffix.
- *
- * <p>This will include a logger seperator between classname and suffix
- *
- * @param name The logger name
- * @param suffix A suffix to append to the classname.
- * @return the dynamic logger
- */
- public static DynamicLogger getDynamicLogger(String name, String suffix)
- {
- return new DynamicLogger(name + "." + suffix);
- }
-
- /**
- * Create a DynamicLogger instance given the logger class. This simply
- * calls create(clazz.getName()).
- *
- * @param clazz the Class whose name will be used as the logger name
- * @return the dynamic logger
- */
- public static DynamicLogger getDynamicLogger(Class<?> clazz)
- {
- return new DynamicLogger(clazz.getName());
- }
-
- /**
- * Create a DynamicLogger instance given the logger class with the given suffix.
- *
- * <p>This will include a logger seperator between classname and suffix
- *
- * @param clazz The Class whose name will be used as the logger name.
- * @param suffix A suffix to append to the classname.
- * @return the dynamic logger
- */
- public static DynamicLogger getDynamicLogger(Class<?> clazz, String suffix)
- {
- return new DynamicLogger(clazz.getName() + "." + suffix);
- }
-
- /**
- * Create a new DynamicLogger.
- *
- * @param name the log name
- */
- protected DynamicLogger(final String name)
- {
- super(name);
- }
-
- /**
- * Sets the logLevel for the log() primitive
- *
- * @param logLevel between LOG_LEVEL_NONE and LOG_LEVEL_TRACE
- */
- public void setLogLevel(int logLevel)
- {
- if (logLevel >= LOG_LEVEL_NONE && logLevel <= LOG_LEVEL_TRACE)
- {
- this.logLevel = logLevel;
- }
- }
-
- /**
- * Gets the logLevel of the log() primitive
- *
- * @return the logLevel of the log() primitive
- */
- public int getLogLevel()
- {
- return logLevel;
- }
-
- /**
- * Sets the logLevel of the log() primitive
- *
- * @param logLevelString the log level in String form
- */
- public void setLogLevelAsString(String logLevelString)
- {
- if (logLevelString != null)
- {
- logLevelString = logLevelString.toUpperCase().trim();
-
- for (int i = 0; i <= LOG_LEVEL_TRACE; i++)
- {
- if (logLevelString.equals(LOG_LEVEL_STRINGS[i]))
- {
- // match
- this.logLevel = i;
- break;
- }
- }
- }
- }
-
- /**
- * Gets the logLevel of the log() primitive in String form
- *
- * @return the logLevel of the log() primitive in String form
- */
- public String getLogLevelAsString()
- {
- return LOG_LEVEL_STRINGS[logLevel];
- }
-
- /**
- * Logs a message using dynamic log level
- *
- * @param message the message to log
- */
- public void log(Object message)
- {
- switch (logLevel)
- {
- case LOG_LEVEL_TRACE:
- super.trace(message);
- break;
-
- case LOG_LEVEL_DEBUG:
- super.debug(message);
- break;
-
- case LOG_LEVEL_INFO:
- super.info(message);
- break;
-
- case LOG_LEVEL_WARN:
- super.warn(message);
- break;
-
- case LOG_LEVEL_ERROR:
- super.error(message);
- break;
-
- case LOG_LEVEL_FATAL:
- super.fatal(message);
- break;
-
- case LOG_LEVEL_NONE:
- default:
- // do nothing
- break;
- }
- }
-
- /**
- * Logs a message and a throwable using dynamic log level
- *
- * @param message the message to log
- * @param t the throwable to log
- */
- public void log(Object message, Throwable t)
- {
- switch (logLevel)
- {
- case LOG_LEVEL_TRACE:
- super.trace(message, t);
- break;
-
- case LOG_LEVEL_DEBUG:
- super.debug(message, t);
- break;
-
- case LOG_LEVEL_INFO:
- super.info(message, t);
- break;
-
- case LOG_LEVEL_WARN:
- super.warn(message, t);
- break;
-
- case LOG_LEVEL_ERROR:
- super.error(message, t);
- break;
-
- case LOG_LEVEL_FATAL:
- super.fatal(message, t);
- break;
-
- case LOG_LEVEL_NONE:
- default:
- // do nothing
- break;
- }
- }
-}
Modified: common-logging-spi/trunk/src/main/java/org/jboss/logging/Logger.java
===================================================================
--- common-logging-spi/trunk/src/main/java/org/jboss/logging/Logger.java 2009-07-29 21:17:18 UTC (rev 3400)
+++ common-logging-spi/trunk/src/main/java/org/jboss/logging/Logger.java 2009-07-29 21:17:34 UTC (rev 3401)
@@ -59,6 +59,19 @@
*/
public class Logger implements Serializable
{
+
+ /**
+ * Levels used by this logging API.
+ */
+ public enum Level {
+ FATAL,
+ ERROR,
+ WARN,
+ INFO,
+ DEBUG,
+ TRACE,
+ }
+
/** Serialization */
private static final long serialVersionUID = 4232175575988879434L;
@@ -84,10 +97,14 @@
/** The logger name. */
private final String name;
+ /** The resource bundle name. */
+ private final String resourceBundleName;
+
/** The logger plugin delegate */
protected transient LoggerPluginInstance loggerDelegate = null;
- /** The LoggerPlugin implementation class name in use
+ /**
+ * The LoggerPlugin implementation class name in use
*
* @return LoggerPlugin implementation class name
*/
@@ -115,10 +132,11 @@
*
* @param name the logger name.
*/
- protected Logger(final String name)
+ Logger(final String name, final String resourceBundleName, final LoggerPluginInstance loggerDelegate)
{
this.name = name;
- this.loggerDelegate = getDelegatePluginInstance(name);
+ this.resourceBundleName = resourceBundleName;
+ this.loggerDelegate = loggerDelegate;
}
/**
@@ -138,7 +156,7 @@
*/
public LoggerPluginInstance getLoggerPlugin()
{
- return this.loggerDelegate;
+ return loggerDelegate;
}
/**
@@ -149,7 +167,7 @@
*/
public boolean isTraceEnabled()
{
- return loggerDelegate.isTraceEnabled();
+ return loggerDelegate.isEnabled(Level.TRACE);
}
/**
@@ -159,7 +177,7 @@
*/
public void trace(Object message)
{
- loggerDelegate.trace(FQCN, message, null, null);
+ loggerDelegate.log(Level.TRACE, FQCN, message, null, null);
}
/**
@@ -170,7 +188,7 @@
*/
public void trace(Object message, Throwable t)
{
- loggerDelegate.trace(FQCN, message, null, t);
+ loggerDelegate.log(Level.TRACE, FQCN, message, null, t);
}
/**
@@ -182,7 +200,7 @@
*/
public void trace(String loggerFqcn, Object message, Throwable t)
{
- loggerDelegate.trace(loggerFqcn, message, null, t);
+ loggerDelegate.log(Level.TRACE, loggerFqcn, message, null, t);
}
/**
@@ -193,7 +211,7 @@
*/
public void trace(Object message, Object[] params)
{
- loggerDelegate.trace(FQCN, message, params, null);
+ loggerDelegate.log(Level.TRACE, FQCN, message, params, null);
}
/**
@@ -205,7 +223,7 @@
*/
public void trace(Object message, Object[] params, Throwable t)
{
- loggerDelegate.trace(FQCN, message, params, t);
+ loggerDelegate.log(Level.TRACE, FQCN, message, params, t);
}
/**
@@ -218,7 +236,7 @@
*/
public void trace(String loggerFqcn, Object message, Object[] params, Throwable t)
{
- loggerDelegate.trace(loggerFqcn, message, params, t);
+ loggerDelegate.log(Level.TRACE, loggerFqcn, message, params, t);
}
/**
@@ -229,7 +247,7 @@
*/
public void tracef(String format, Object... params)
{
- loggerDelegate.tracef(FQCN, format, params, null);
+ loggerDelegate.logf(Level.TRACE, FQCN, format, params, null);
}
/**
@@ -241,7 +259,7 @@
*/
public void tracef(Throwable t, String format, Object... params)
{
- loggerDelegate.tracef(FQCN, format, params, t);
+ loggerDelegate.logf(Level.TRACE, FQCN, format, params, t);
}
/**
@@ -252,7 +270,7 @@
*/
public boolean isDebugEnabled()
{
- return loggerDelegate.isDebugEnabled();
+ return loggerDelegate.isEnabled(Level.DEBUG);
}
/**
@@ -262,7 +280,7 @@
*/
public void debug(Object message)
{
- loggerDelegate.debug(FQCN, message, null, null);
+ loggerDelegate.log(Level.DEBUG, FQCN, message, null, null);
}
/**
@@ -273,7 +291,7 @@
*/
public void debug(Object message, Throwable t)
{
- loggerDelegate.debug(FQCN, message, null, t);
+ loggerDelegate.log(Level.DEBUG, FQCN, message, null, t);
}
/**
@@ -285,7 +303,7 @@
*/
public void debug(String loggerFqcn, Object message, Throwable t)
{
- loggerDelegate.debug(loggerFqcn, message, null, t);
+ loggerDelegate.log(Level.DEBUG, loggerFqcn, message, null, t);
}
/**
@@ -296,7 +314,7 @@
*/
public void debug(Object message, Object[] params)
{
- loggerDelegate.debug(FQCN, message, params, null);
+ loggerDelegate.log(Level.DEBUG, FQCN, message, params, null);
}
/**
@@ -308,7 +326,7 @@
*/
public void debug(Object message, Object[] params, Throwable t)
{
- loggerDelegate.debug(FQCN, message, params, t);
+ loggerDelegate.log(Level.DEBUG, FQCN, message, params, t);
}
/**
@@ -321,7 +339,7 @@
*/
public void debug(String loggerFqcn, Object message, Object[] params, Throwable t)
{
- loggerDelegate.debug(loggerFqcn, message, params, t);
+ loggerDelegate.log(Level.DEBUG, loggerFqcn, message, params, t);
}
/**
@@ -332,7 +350,7 @@
*/
public void debugf(String format, Object... params)
{
- loggerDelegate.debugf(FQCN, format, params, null);
+ loggerDelegate.logf(Level.DEBUG, FQCN, format, params, null);
}
/**
@@ -344,7 +362,7 @@
*/
public void debugf(Throwable t, String format, Object... params)
{
- loggerDelegate.debugf(FQCN, format, params, t);
+ loggerDelegate.logf(Level.DEBUG, FQCN, format, params, t);
}
/**
@@ -355,7 +373,7 @@
*/
public boolean isInfoEnabled()
{
- return loggerDelegate.isInfoEnabled();
+ return loggerDelegate.isEnabled(Level.INFO);
}
/**
@@ -365,7 +383,7 @@
*/
public void info(Object message)
{
- loggerDelegate.info(FQCN, message, null, null);
+ loggerDelegate.log(Level.INFO, FQCN, message, null, null);
}
/**
@@ -376,7 +394,7 @@
*/
public void info(Object message, Throwable t)
{
- loggerDelegate.info(FQCN, message, null, t);
+ loggerDelegate.log(Level.INFO, FQCN, message, null, t);
}
/**
@@ -388,7 +406,7 @@
*/
public void info(String loggerFqcn, Object message, Throwable t)
{
- loggerDelegate.info(loggerFqcn, message, null, t);
+ loggerDelegate.log(Level.INFO, loggerFqcn, message, null, t);
}
/**
@@ -399,7 +417,7 @@
*/
public void info(Object message, Object[] params)
{
- loggerDelegate.info(FQCN, message, params, null);
+ loggerDelegate.log(Level.INFO, FQCN, message, params, null);
}
/**
@@ -411,7 +429,7 @@
*/
public void info(Object message, Object[] params, Throwable t)
{
- loggerDelegate.info(FQCN, message, params, t);
+ loggerDelegate.log(Level.INFO, FQCN, message, params, t);
}
/**
@@ -424,7 +442,7 @@
*/
public void info(String loggerFqcn, Object message, Object[] params, Throwable t)
{
- loggerDelegate.info(loggerFqcn, message, params, t);
+ loggerDelegate.log(Level.INFO, loggerFqcn, message, params, t);
}
/**
@@ -435,7 +453,7 @@
*/
public void infof(String format, Object... params)
{
- loggerDelegate.infof(FQCN, format, params, null);
+ loggerDelegate.logf(Level.INFO, FQCN, format, params, null);
}
/**
@@ -447,7 +465,7 @@
*/
public void infof(Throwable t, String format, Object... params)
{
- loggerDelegate.infof(FQCN, format, params, t);
+ loggerDelegate.logf(Level.INFO, FQCN, format, params, t);
}
/**
@@ -457,7 +475,7 @@
*/
public void warn(Object message)
{
- loggerDelegate.warn(FQCN, message, null, null);
+ loggerDelegate.log(Level.WARN, FQCN, message, null, null);
}
/**
@@ -468,7 +486,7 @@
*/
public void warn(Object message, Throwable t)
{
- loggerDelegate.warn(FQCN, message, null, t);
+ loggerDelegate.log(Level.WARN, FQCN, message, null, t);
}
/**
@@ -480,7 +498,7 @@
*/
public void warn(String loggerFqcn, Object message, Throwable t)
{
- loggerDelegate.warn(loggerFqcn, message, null, t);
+ loggerDelegate.log(Level.WARN, loggerFqcn, message, null, t);
}
/**
@@ -491,7 +509,7 @@
*/
public void warn(Object message, Object[] params)
{
- loggerDelegate.warn(FQCN, message, params, null);
+ loggerDelegate.log(Level.WARN, FQCN, message, params, null);
}
/**
@@ -503,7 +521,7 @@
*/
public void warn(Object message, Object[] params, Throwable t)
{
- loggerDelegate.warn(FQCN, message, params, t);
+ loggerDelegate.log(Level.WARN, FQCN, message, params, t);
}
/**
@@ -516,7 +534,7 @@
*/
public void warn(String loggerFqcn, Object message, Object[] params, Throwable t)
{
- loggerDelegate.warn(loggerFqcn, message, params, t);
+ loggerDelegate.log(Level.WARN, loggerFqcn, message, params, t);
}
/**
@@ -527,7 +545,7 @@
*/
public void warnf(String format, Object... params)
{
- loggerDelegate.warnf(FQCN, format, params, null);
+ loggerDelegate.logf(Level.WARN, FQCN, format, params, null);
}
/**
@@ -539,7 +557,7 @@
*/
public void warnf(Throwable t, String format, Object... params)
{
- loggerDelegate.warnf(FQCN, format, params, t);
+ loggerDelegate.logf(Level.WARN, FQCN, format, params, t);
}
/**
@@ -549,7 +567,7 @@
*/
public void error(Object message)
{
- loggerDelegate.error(FQCN, message, null, null);
+ loggerDelegate.log(Level.ERROR, FQCN, message, null, null);
}
/**
@@ -560,7 +578,7 @@
*/
public void error(Object message, Throwable t)
{
- loggerDelegate.error(FQCN, message, null, t);
+ loggerDelegate.log(Level.ERROR, FQCN, message, null, t);
}
/**
@@ -572,7 +590,7 @@
*/
public void error(String loggerFqcn, Object message, Throwable t)
{
- loggerDelegate.error(loggerFqcn, message, null, t);
+ loggerDelegate.log(Level.ERROR, loggerFqcn, message, null, t);
}
/**
@@ -583,7 +601,7 @@
*/
public void error(Object message, Object[] params)
{
- loggerDelegate.error(FQCN, message, params, null);
+ loggerDelegate.log(Level.ERROR, FQCN, message, params, null);
}
/**
@@ -595,7 +613,7 @@
*/
public void error(Object message, Object[] params, Throwable t)
{
- loggerDelegate.error(FQCN, message, params, t);
+ loggerDelegate.log(Level.ERROR, FQCN, message, params, t);
}
/**
@@ -608,7 +626,7 @@
*/
public void error(String loggerFqcn, Object message, Object[] params, Throwable t)
{
- loggerDelegate.error(loggerFqcn, message, params, t);
+ loggerDelegate.log(Level.ERROR, loggerFqcn, message, params, t);
}
/**
@@ -619,7 +637,7 @@
*/
public void errorf(String format, Object... params)
{
- loggerDelegate.errorf(FQCN, format, params, null);
+ loggerDelegate.logf(Level.ERROR, FQCN, format, params, null);
}
/**
@@ -631,7 +649,7 @@
*/
public void errorf(Throwable t, String format, Object... params)
{
- loggerDelegate.errorf(FQCN, format, params, t);
+ loggerDelegate.logf(Level.ERROR, FQCN, format, params, t);
}
/**
@@ -641,7 +659,7 @@
*/
public void fatal(Object message)
{
- loggerDelegate.fatal(FQCN, message, null, null);
+ loggerDelegate.log(Level.FATAL, FQCN, message, null, null);
}
/**
@@ -652,7 +670,7 @@
*/
public void fatal(Object message, Throwable t)
{
- loggerDelegate.fatal(FQCN, message, null, t);
+ loggerDelegate.log(Level.FATAL, FQCN, message, null, t);
}
/**
@@ -664,7 +682,7 @@
*/
public void fatal(String loggerFqcn, Object message, Throwable t)
{
- loggerDelegate.fatal(loggerFqcn, message, null, t);
+ loggerDelegate.log(Level.FATAL, loggerFqcn, message, null, t);
}
/**
@@ -675,7 +693,7 @@
*/
public void fatal(Object message, Object[] params)
{
- loggerDelegate.fatal(FQCN, message, params, null);
+ loggerDelegate.log(Level.FATAL, FQCN, message, params, null);
}
/**
@@ -687,7 +705,7 @@
*/
public void fatal(Object message, Object[] params, Throwable t)
{
- loggerDelegate.fatal(FQCN, message, params, t);
+ loggerDelegate.log(Level.FATAL, FQCN, message, params, t);
}
/**
@@ -700,7 +718,7 @@
*/
public void fatal(String loggerFqcn, Object message, Object[] params, Throwable t)
{
- loggerDelegate.fatal(loggerFqcn, message, params, t);
+ loggerDelegate.log(Level.FATAL, loggerFqcn, message, params, t);
}
/**
@@ -711,7 +729,7 @@
*/
public void fatalf(String format, Object... params)
{
- loggerDelegate.fatalf(FQCN, format, params, null);
+ loggerDelegate.logf(Level.FATAL, FQCN, format, params, null);
}
/**
@@ -723,11 +741,99 @@
*/
public void fatalf(Throwable t, String format, Object... params)
{
- loggerDelegate.fatalf(FQCN, format, params, t);
+ loggerDelegate.logf(Level.FATAL, FQCN, format, params, t);
}
+ /**
+ * Log a message at the given level.
+ *
+ * @param level the level
+ * @param message the message
+ */
+ public void log(Level level, Object message)
+ {
+ loggerDelegate.log(level, FQCN, message, null, null);
+ }
/**
+ * Log a message at the given level.
+ *
+ * @param level the level
+ * @param message the message
+ * @param params the message parameters
+ */
+ public void log(Level level, Object message, Object[] params)
+ {
+ loggerDelegate.log(level, FQCN, message, params, null);
+ }
+
+ /**
+ * Log a message at the given level.
+ *
+ * @param level the level
+ * @param message the message
+ * @param params the message parameters
+ * @param t the throwable cause
+ */
+ public void log(Level level, Object message, Object[] params, Throwable t)
+ {
+ loggerDelegate.log(level, FQCN, message, params, t);
+ }
+
+ /**
+ * Log a message at the given level.
+ *
+ * @param loggerFqcn the logger class name
+ * @param level the level
+ * @param message the message
+ * @param params the message parameters
+ * @param t the throwable cause
+ */
+ public void log(String loggerFqcn, Level level, Object message, Object[] params, Throwable t)
+ {
+ loggerDelegate.log(level, loggerFqcn, message, params, t);
+ }
+
+ /**
+ * Log a message at the given level.
+ *
+ * @param level the level
+ * @param format the format string as per {@link String#format(String, Object[])} or resource bundle key therefor
+ * @param params the message parameters
+ */
+ public void logf(Level level, String format, Object... params)
+ {
+ loggerDelegate.logf(level, FQCN, format, params, null);
+ }
+
+ /**
+ * Log a message at the given level.
+ *
+ * @param level the level
+ * @param t the throwable cause
+ * @param format the format string as per {@link String#format(String, Object[])} or resource bundle key therefor
+ * @param params the message parameters
+ */
+ public void logf(Level level, Throwable t, String format, Object... params)
+ {
+ loggerDelegate.logf(level, FQCN, format, params, t);
+ }
+
+ /**
+ * Log a message at the given level.
+ *
+ * @param loggerFqcn the logger class name
+ * @param level the level
+ * @param t the throwable cause
+ * @param format the format string as per {@link String#format(String, Object[])} or resource bundle key therefor
+ * @param params the message parameters
+ */
+ public void logf(String loggerFqcn, Level level, Throwable t, String format, Object... params)
+ {
+ loggerDelegate.logf(level, loggerFqcn, format, params, t);
+ }
+
+ /**
* Custom serialization to reinitalize the delegate
*
* @param stream the object stream
@@ -744,22 +850,52 @@
{
init();
}
- this.loggerDelegate = getDelegatePluginInstance(name);
}
+ private Object readResolve()
+ {
+ return getDelegatePluginInstance(name, resourceBundleName).getLogger();
+ }
+
/**
- * Create a Logger instance given the logger name.
+ * Get a logger instance with the given name using the given resource bundle (if supported by the underlying
+ * framework).
*
+ * @param name the logger category name
+ * @param resourceBundleName the resource bundle name
+ * @return the logger
+ */
+ public static Logger getI18nLogger(String name, String resourceBundleName)
+ {
+ return getDelegatePluginInstance(name, resourceBundleName).getLogger();
+ }
+
+ /**
+ * Get a logger instance with the given name using the given resource bundle (if supported by the underlying
+ * framework).
+ *
+ * @param clazz the class whose name will be used as the logger category name
+ * @param resourceBundleName the resource bundle name
+ * @return the logger
+ */
+ public static Logger getI18nLogger(Class<?> clazz, String resourceBundleName)
+ {
+ return getI18nLogger(clazz.getName(), resourceBundleName);
+ }
+
+ /**
+ * Get a Logger instance given the logger name.
+ *
* @param name the logger name
* @return the logger
*/
public static Logger getLogger(String name)
{
- return new Logger(name);
+ return getI18nLogger(name, null);
}
/**
- * Create a Logger instance given the logger name with the given suffix.
+ * Get a Logger instance given the logger name with the given suffix.
*
* <p>This will include a logger seperator between classname and suffix
*
@@ -769,11 +905,11 @@
*/
public static Logger getLogger(String name, String suffix)
{
- return new Logger(name + "." + suffix);
+ return getLogger(name == null || name.length() == 0 ? suffix : name + "." + suffix);
}
/**
- * Create a Logger instance given the logger class. This simply
+ * Get a Logger instance given the name of a class. This simply
* calls create(clazz.getName()).
*
* @param clazz the Class whose name will be used as the logger name
@@ -781,11 +917,11 @@
*/
public static Logger getLogger(Class<?> clazz)
{
- return new Logger(clazz.getName());
+ return getLogger(clazz.getName());
}
/**
- * Create a Logger instance given the logger class with the given suffix.
+ * Get a Logger instance given the name of a class with the given suffix.
*
* <p>This will include a logger seperator between classname and suffix
*
@@ -795,16 +931,17 @@
*/
public static Logger getLogger(Class<?> clazz, String suffix)
{
- return new Logger(clazz.getName() + "." + suffix);
+ return getLogger(clazz.getName(), suffix);
}
/**
* Get the delegate plugin
*
* @param name the name of the logger
+ * @param resourceBundleName the default resource bundle name to use
* @return the plugin
*/
- protected static LoggerPluginInstance getDelegatePluginInstance(String name)
+ static LoggerPluginInstance getDelegatePluginInstance(String name, String resourceBundleName)
{
LoggerPlugin plugin;
LoggerPluginInstance instance;
@@ -818,14 +955,14 @@
}
try
{
- instance = plugin.getInstance(name);
+ instance = plugin.getInstance(name, resourceBundleName);
}
catch (Throwable e)
{
String extraInfo = e.getMessage();
System.err.println("Failed to initalize plugin: " + plugin
+ (extraInfo != null ? ", cause: " + extraInfo : ""));
- instance = new NullLoggerPluginInstance();
+ instance = new NullLoggerPluginInstance(name);
}
return instance;
Modified: common-logging-spi/trunk/src/main/java/org/jboss/logging/LoggerPlugin.java
===================================================================
--- common-logging-spi/trunk/src/main/java/org/jboss/logging/LoggerPlugin.java 2009-07-29 21:17:18 UTC (rev 3400)
+++ common-logging-spi/trunk/src/main/java/org/jboss/logging/LoggerPlugin.java 2009-07-29 21:17:34 UTC (rev 3401)
@@ -25,14 +25,15 @@
/**
* A factory for producing logger plugins. Implementations may implement some type of caching/reuse.
*/
-public interface LoggerPlugin extends MDCSupport, NDCSupport
+public interface LoggerPlugin
{
/**
* Get a logger plugin instance with the given name. The returned instance may be a cached or newly
* created instance.
*
* @param name the logger category name
+ * @param resourceBundleName the resource bundle name
* @return the corresponding logger plugin instance
*/
- LoggerPluginInstance getInstance(String name);
+ LoggerPluginInstance getInstance(String name, String resourceBundleName);
}
Modified: common-logging-spi/trunk/src/main/java/org/jboss/logging/LoggerPluginInstance.java
===================================================================
--- common-logging-spi/trunk/src/main/java/org/jboss/logging/LoggerPluginInstance.java 2009-07-29 21:17:18 UTC (rev 3400)
+++ common-logging-spi/trunk/src/main/java/org/jboss/logging/LoggerPluginInstance.java 2009-07-29 21:17:34 UTC (rev 3401)
@@ -1,8 +1,8 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
@@ -24,168 +24,48 @@
/**
* Defines a "pluggable" login module's logger implementation.
*
- * @see org.jboss.logging.Logger
- * @see NullLoggerPluginInstance
- *
- * @author <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>
+ * @author <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>
* @author David M. Lloyd
* @version $Revision$
+ * @see org.jboss.logging.Logger
+ * @see NullLoggerPluginInstance
*/
-public interface LoggerPluginInstance
-{
- /**
- * Check to see if the TRACE level is enabled for this logger.
- *
- * @return true if a {@link #trace(String, Object, Object[], Throwable) trace*()} method invocation would pass
- * the msg to the configured appenders, false otherwise.
- */
- boolean isTraceEnabled();
+public interface LoggerPluginInstance {
- /**
- * Issue a log msg and throwable with a level of TRACE and a specific logger class name, with the given
- * parameters.
- *
- * @param loggerFcqn the logger class name
- * @param message the message
- * @param params the parameters, or {@code null} for none
- * @param t the throwable, or {@code null} for none
- */
- void trace(String loggerFcqn, Object message, Object[] params, Throwable t);
-
/**
- * Issue a log msg and throwable with a level of TRACE and a specific logger class name, with the given
- * parameters, formatting using the {@link java.util.Formatter} format methodology.
+ * Get the logger API instance associated with this plugin instance.
*
- * @param loggerFcqn the logger class name
- * @param message the message
- * @param params the parameters, or {@code null} for none
- * @param t the throwable, or {@code null} for none
+ * @return the logger instance
*/
- void tracef(String loggerFcqn, Object message, Object[] params, Throwable t);
+ Logger getLogger();
- /**
- * Check to see if the DEBUG level is enabled for this logger.
- *
- * @return true if a {@link #debug(String, Object, Object[], Throwable) debug*()} method invocation would pass
- * the msg to the configured appenders, false otherwise.
- */
- boolean isDebugEnabled();
-
- /**
- * Issue a log msg and throwable with a level of DEBUG and a specific logger class name, with the given
- * parameters.
- *
- * @param loggerFcqn the logger class name
- * @param message the message
- * @param params the parameters, or {@code null} for none
- * @param t the throwable, or {@code null} for none
- */
- void debug(String loggerFcqn, Object message, Object[] params, Throwable t);
-
/**
- * Issue a log msg and throwable with a level of DEBUG and a specific logger class name, with the given
- * parameters, formatting using the {@link java.util.Formatter} format methodology.
+ * Determine whether logging is enabled for the given level.
*
- * @param loggerFcqn the logger class name
- * @param message the message
- * @param params the parameters, or {@code null} for none
- * @param t the throwable, or {@code null} for none
+ * @param level the level
+ * @return {@code false} if logging is disabled, or {@code true} if logging is enabled or cannot be ascertained
*/
- void debugf(String loggerFcqn, Object message, Object[] params, Throwable t);
+ boolean isEnabled(Logger.Level level);
- /**
- * Check to see if the INFO level is enabled for this logger.
- *
- * @return true if a {@link #info(String, Object, Object[], Throwable) info*()} method invocation would pass
- * the msg to the configured appenders, false otherwise.
- */
- boolean isInfoEnabled();
-
- /**
- * Issue a log msg and throwable with a level of INFO and a specific logger class name, with the given
- * parameters.
- *
- * @param loggerFcqn the logger class name
- * @param message the message
- * @param params the parameters, or {@code null} for none
- * @param t the throwable, or {@code null} for none
- */
- void info(String loggerFcqn, Object message, Object[] params, Throwable t);
-
/**
- * Issue a log msg and throwable with a level of INFO and a specific logger class name, with the given
- * parameters, formatting using the {@link java.util.Formatter} format methodology.
+ * Log a message at the given level using messageformat formatting.
*
- * @param loggerFcqn the logger class name
+ * @param level the level
+ * @param loggerFqcn the fully qualified class name
* @param message the message
- * @param params the parameters, or {@code null} for none
- * @param t the throwable, or {@code null} for none
+ * @param params the message parameters or {@code null} if none
+ * @param t the throwable cause or {@code null} if none
*/
- void infof(String loggerFcqn, Object message, Object[] params, Throwable t);
+ void log(Logger.Level level, String loggerFqcn, Object message, Object[] params, Throwable t);
- /**
- * Issue a log msg and throwable with a level of WARN and a specific logger class name, with the given
- * parameters.
- *
- * @param loggerFcqn the logger class name
- * @param message the message
- * @param params the parameters, or {@code null} for none
- * @param t the throwable, or {@code null} for none
- */
- void warn(String loggerFcqn, Object message, Object[] params, Throwable t);
-
/**
- * Issue a log msg and throwable with a level of WARN and a specific logger class name, with the given
- * parameters, formatting using the {@link java.util.Formatter} format methodology.
+ * Log a message at the given level using printf formatting.
*
- * @param loggerFcqn the logger class name
- * @param message the message
- * @param params the parameters, or {@code null} for none
- * @param t the throwable, or {@code null} for none
+ * @param level the level
+ * @param loggerFqcn the fully qualified class name
+ * @param format the message format
+ * @param params the message parameters or {@code null} if none
+ * @param t the throwable cause or {@code null} if none
*/
- void warnf(String loggerFcqn, Object message, Object[] params, Throwable t);
-
- /**
- * Issue a log msg and throwable with a level of ERROR and a specific logger class name, with the given
- * parameters.
- *
- * @param loggerFcqn the logger class name
- * @param message the message
- * @param params the parameters, or {@code null} for none
- * @param t the throwable, or {@code null} for none
- */
- void error(String loggerFcqn, Object message, Object[] params, Throwable t);
-
- /**
- * Issue a log msg and throwable with a level of ERROR and a specific logger class name, with the given
- * parameters, formatting using the {@link java.util.Formatter} format methodology.
- *
- * @param loggerFcqn the logger class name
- * @param message the message
- * @param params the parameters, or {@code null} for none
- * @param t the throwable, or {@code null} for none
- */
- void errorf(String loggerFcqn, Object message, Object[] params, Throwable t);
-
- /**
- * Issue a log msg and throwable with a level of FATAL and a specific logger class name, with the given
- * parameters.
- *
- * @param loggerFcqn the logger class name
- * @param message the message
- * @param params the parameters, or {@code null} for none
- * @param t the throwable, or {@code null} for none
- */
- void fatal(String loggerFcqn, Object message, Object[] params, Throwable t);
-
- /**
- * Issue a log msg and throwable with a level of FATAL and a specific logger class name, with the given
- * parameters, formatting using the {@link java.util.Formatter} format methodology.
- *
- * @param loggerFcqn the logger class name
- * @param message the message
- * @param params the parameters, or {@code null} for none
- * @param t the throwable, or {@code null} for none
- */
- void fatalf(String loggerFcqn, Object message, Object[] params, Throwable t);
+ void logf(Logger.Level level, String loggerFqcn, String format, Object[] params, Throwable t);
}
Modified: common-logging-spi/trunk/src/main/java/org/jboss/logging/MDC.java
===================================================================
--- common-logging-spi/trunk/src/main/java/org/jboss/logging/MDC.java 2009-07-29 21:17:18 UTC (rev 3400)
+++ common-logging-spi/trunk/src/main/java/org/jboss/logging/MDC.java 2009-07-29 21:17:34 UTC (rev 3401)
@@ -32,6 +32,9 @@
{
private final static MDCProvider mdc;
+ private MDC() {
+ }
+
static
{
MDCProvider m = null;
Modified: common-logging-spi/trunk/src/main/java/org/jboss/logging/MDCProvider.java
===================================================================
--- common-logging-spi/trunk/src/main/java/org/jboss/logging/MDCProvider.java 2009-07-29 21:17:18 UTC (rev 3400)
+++ common-logging-spi/trunk/src/main/java/org/jboss/logging/MDCProvider.java 2009-07-29 21:17:34 UTC (rev 3401)
@@ -30,11 +30,11 @@
*/
public interface MDCProvider
{
- public void put(String key, Object value);
+ void put(String key, Object value);
- public Object get(String key);
+ Object get(String key);
- public void remove(String key);
+ void remove(String key);
- public Map<String, Object> getMap();
+ Map<String, Object> getMap();
}
Modified: common-logging-spi/trunk/src/main/java/org/jboss/logging/MDCSupport.java
===================================================================
--- common-logging-spi/trunk/src/main/java/org/jboss/logging/MDCSupport.java 2009-07-29 21:17:18 UTC (rev 3400)
+++ common-logging-spi/trunk/src/main/java/org/jboss/logging/MDCSupport.java 2009-07-29 21:17:34 UTC (rev 3401)
@@ -28,5 +28,10 @@
*/
public interface MDCSupport
{
- public MDCProvider getMDCProvider();
+ /**
+ * Get the MDC provider.
+ *
+ * @return the MDC provider
+ */
+ MDCProvider getMDCProvider();
}
Modified: common-logging-spi/trunk/src/main/java/org/jboss/logging/NDC.java
===================================================================
--- common-logging-spi/trunk/src/main/java/org/jboss/logging/NDC.java 2009-07-29 21:17:18 UTC (rev 3400)
+++ common-logging-spi/trunk/src/main/java/org/jboss/logging/NDC.java 2009-07-29 21:17:34 UTC (rev 3401)
@@ -31,6 +31,9 @@
{
private final static NDCProvider ndc;
+ private NDC() {
+ }
+
static
{
NDCProvider n = null;
Modified: common-logging-spi/trunk/src/main/java/org/jboss/logging/NDCProvider.java
===================================================================
--- common-logging-spi/trunk/src/main/java/org/jboss/logging/NDCProvider.java 2009-07-29 21:17:18 UTC (rev 3400)
+++ common-logging-spi/trunk/src/main/java/org/jboss/logging/NDCProvider.java 2009-07-29 21:17:34 UTC (rev 3401)
@@ -29,17 +29,17 @@
*/
public interface NDCProvider
{
- public void clear();
+ void clear();
- public String get();
+ String get();
- public int getDepth();
+ int getDepth();
- public String pop();
+ String pop();
- public String peek();
+ String peek();
- public void push(String message);
+ void push(String message);
- public void setMaxDepth(int maxDepth);
+ void setMaxDepth(int maxDepth);
}
\ No newline at end of file
Modified: common-logging-spi/trunk/src/main/java/org/jboss/logging/NDCSupport.java
===================================================================
--- common-logging-spi/trunk/src/main/java/org/jboss/logging/NDCSupport.java 2009-07-29 21:17:18 UTC (rev 3400)
+++ common-logging-spi/trunk/src/main/java/org/jboss/logging/NDCSupport.java 2009-07-29 21:17:34 UTC (rev 3401)
@@ -28,5 +28,5 @@
*/
public interface NDCSupport
{
- public NDCProvider getNDCProvider();
+ NDCProvider getNDCProvider();
}
Modified: common-logging-spi/trunk/src/main/java/org/jboss/logging/NullLoggerPlugin.java
===================================================================
--- common-logging-spi/trunk/src/main/java/org/jboss/logging/NullLoggerPlugin.java 2009-07-29 21:17:18 UTC (rev 3400)
+++ common-logging-spi/trunk/src/main/java/org/jboss/logging/NullLoggerPlugin.java 2009-07-29 21:17:34 UTC (rev 3401)
@@ -23,19 +23,21 @@
package org.jboss.logging;
/**
- * The null logger plugin. Always returns the same plugin instance.
+ * The null logger plugin.
*/
public class NullLoggerPlugin implements LoggerPlugin {
- public static final LoggerPluginInstance INSTANCE = new NullLoggerPluginInstance();
- public LoggerPluginInstance getInstance(String name) {
- return INSTANCE;
- }
+ /** {@inheritDoc} */
+ public LoggerPluginInstance getInstance(String name, final String resourceBundleName) {
+ return new NullLoggerPluginInstance(name);
+ }
+ /** {@inheritDoc} */
public MDCProvider getMDCProvider() {
return NullMDCProvider.INSTANCE;
}
+ /** {@inheritDoc} */
public NDCProvider getNDCProvider() {
return NullNDCProvider.INSTANCE;
}
Modified: common-logging-spi/trunk/src/main/java/org/jboss/logging/NullLoggerPluginInstance.java
===================================================================
--- common-logging-spi/trunk/src/main/java/org/jboss/logging/NullLoggerPluginInstance.java 2009-07-29 21:17:18 UTC (rev 3400)
+++ common-logging-spi/trunk/src/main/java/org/jboss/logging/NullLoggerPluginInstance.java 2009-07-29 21:17:34 UTC (rev 3401)
@@ -1,8 +1,8 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
@@ -34,33 +34,25 @@
*/
public class NullLoggerPluginInstance extends AbstractLoggerPluginInstance
{
- public boolean isTraceEnabled() {
- return false;
+ /**
+ * Construct a new instance.
+ *
+ * @param name the logger name to use
+ */
+ public NullLoggerPluginInstance(final String name) {
+ super(name, null);
}
- public void trace(String loggerFcqn, Object message, Object[] params, Throwable t) {
- }
-
- public boolean isDebugEnabled() {
+ /** {@inheritDoc} */
+ public boolean isEnabled(final Logger.Level level) {
return false;
}
- public void debug(String loggerFcqn, Object message, Object[] params, Throwable t) {
+ /** {@inheritDoc} */
+ public void logf(final Logger.Level level, final String loggerFqcn, final String format, final Object[] params, final Throwable t) {
}
- public boolean isInfoEnabled() {
- return false;
+ /** {@inheritDoc} */
+ public void log(final Logger.Level level, final String loggerFqcn, final Object message, final Object[] params, final Throwable t) {
}
-
- public void info(String loggerFcqn, Object message, Object[] params, Throwable t) {
- }
-
- public void warn(String loggerFcqn, Object message, Object[] params, Throwable t) {
- }
-
- public void error(String loggerFcqn, Object message, Object[] params, Throwable t) {
- }
-
- public void fatal(String loggerFcqn, Object message, Object[] params, Throwable t) {
- }
}
Modified: common-logging-spi/trunk/src/main/java/org/jboss/logging/NullNDCProvider.java
===================================================================
--- common-logging-spi/trunk/src/main/java/org/jboss/logging/NullNDCProvider.java 2009-07-29 21:17:18 UTC (rev 3400)
+++ common-logging-spi/trunk/src/main/java/org/jboss/logging/NullNDCProvider.java 2009-07-29 21:17:34 UTC (rev 3401)
@@ -21,8 +21,6 @@
*/
package org.jboss.logging;
-import java.util.Stack;
-
/**
* An NDC provider which does nothing.
*
@@ -36,11 +34,6 @@
{
}
- public Stack<String> cloneStack()
- {
- return null;
- }
-
public String get()
{
return null;
@@ -51,10 +44,6 @@
return 0;
}
- public void inherit(Stack<String> stack)
- {
- }
-
public String peek()
{
return null;
@@ -69,10 +58,6 @@
{
}
- public void remove()
- {
- }
-
public void setMaxDepth(int maxDepth)
{
}
More information about the jboss-svn-commits
mailing list