org.objectweb.util.monolog.api
Interface HandlerFactory

All Known Subinterfaces:
Configurable, MonologFactory
All Known Implementing Classes:
AbstractFactory, BasicFactory, LoggerImpl, MonologLoggerFactory

public interface HandlerFactory

It permits to manage Handler instances.

Author:
Sebastien Chassande-Barrioz

Method Summary
 Handler createHandler(java.lang.String hn, java.lang.String handlertype)
          It retrieves a new instance of an handler which the type is specified by the parameter.
 Handler getHandler(java.lang.String handlername)
          It retrieves the handler which the name is specified by the parameter
 Handler[] getHandlers()
          It retrieves all handler managed by this factory.
 Handler removeHandler(java.lang.String handlername)
          It removes the handler which the name is specified by the parameter
 

Method Detail

createHandler

public Handler createHandler(java.lang.String hn,
                             java.lang.String handlertype)
It retrieves a new instance of an handler which the type is specified by the parameter.

Parameters:
handlertype - is the type of the parameter. The possible value are defined in this interface by the XXX_HANDLER_TYPE constants.
Returns:
a new instance of an handler

getHandlers

public Handler[] getHandlers()
It retrieves all handler managed by this factory.

Returns:
a set of Handler instance or an empty set.

getHandler

public Handler getHandler(java.lang.String handlername)
It retrieves the handler which the name is specified by the parameter

Parameters:
handlername - is the name of the handler
Returns:
an handler instance or a null value.

removeHandler

public Handler removeHandler(java.lang.String handlername)
It removes the handler which the name is specified by the parameter

Parameters:
handlername - is the name of the handler
Returns:
the removed handler instance or a null value if it does not exist.