com.agilejava.blammo
Class BlammoLoggerFactory

java.lang.Object
  extended by com.agilejava.blammo.BlammoLoggerFactory

public class BlammoLoggerFactory
extends java.lang.Object

The class for creating a logger. Note that a logger is not required to implement a certain interface. The only requirement is that it implements an interface, and that this interface has logXXXXXX operations that have blammo annotations.

Author:
Wilfred Springer

Constructor Summary
BlammoLoggerFactory()
           
 
Method Summary
static java.lang.Object create(java.lang.Class intf)
          Creates a new logger for the interface passed in.
static java.lang.Object create(java.lang.Class intf, BlammoLogger.Interceptor interceptor)
          Creates a new logger, using the BlammoLogger.Interceptor.
static java.lang.Object create(java.lang.Class intf, LoggingKit kit)
          Creates a new logger for the interface passed in, using the LoggingKit to create a low level logging kit specific version.
static java.lang.Object create(java.lang.Class intf, LoggingKitAdapter adapter)
          Creates a new logger for the logging interface passed in, using the LoggingKitAdapter to create a low level logging kit specific version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlammoLoggerFactory

public BlammoLoggerFactory()
Method Detail

create

public static java.lang.Object create(java.lang.Class intf)
                               throws BlammoException
Creates a new logger for the interface passed in.

Parameters:
intf - The interface specifying the logger interface.
Returns:
An implementation of this interface.
Throws:
BlammoException - If this operation fails to create an implementation of this interface.

create

public static java.lang.Object create(java.lang.Class intf,
                                      LoggingKit kit)
                               throws BlammoException
Creates a new logger for the interface passed in, using the LoggingKit to create a low level logging kit specific version.

Parameters:
intf - The interface for which we need to construct a new logger.
kit - An object representing a particular low level logging kit.
Returns:
A new logger, implementing the intf interface.
Throws:
BlammoException - If this operation fails to create an implementation of this interface.

create

public static java.lang.Object create(java.lang.Class intf,
                                      LoggingKitAdapter adapter)
                               throws BlammoException
Creates a new logger for the logging interface passed in, using the LoggingKitAdapter to create a low level logging kit specific version.

Parameters:
intf - The interface for which we need to construct a new logger.
adapter - An object representing a particular low level logging logger.
Returns:
A new logger, implementing the intf interface.
Throws:
BlammoException - If this operation fails to create an implementation of this interface.

create

public static java.lang.Object create(java.lang.Class intf,
                                      BlammoLogger.Interceptor interceptor)
Creates a new logger, using the BlammoLogger.Interceptor.

Parameters:
intf - The interface for which we need to construct a new logger.
interceptor - The interceptor that gets the opportunity to veto every message.


Copyright © 2008. All Rights Reserved.