org.objectweb.util.monolog.api

Interface HandlerFactory

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

public interface HandlerFactory

It permits to manage Handler instances.

Author:
Sebastien Chassande-Barrioz

Method Summary

Handler
createHandler(String hn, String handlertype)
It retrieves a new instance of an handler which the type is specified by the parameter.
Handler
getHandler(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(String handlername)
It removes the handler which the name is specified by the parameter

Method Details

createHandler

public Handler createHandler(String hn,
                             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


getHandler

public Handler getHandler(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.


getHandlers

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

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


removeHandler

public Handler removeHandler(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.