org.objectweb.util.monolog.wrapper.remote.api

Interface MonologFactoryProxy

Known Implementing Classes:
MonologFactoryProxyImpl

public interface MonologFactoryProxy

Author:
S.Chassande-Barrioz

Method Summary

void
addHandlerToLogger(String handlerName, String loggerName)
A TopicalLogger manages a list of Handler instances.
void
addTopicToLogger(String topic, String loggerName)
This method allows adding a topic to a TopicalLogger.
int
compareTo(String levelname1, String levelname2)
Compares two levels.
boolean
createHandler(String hn, String handlertype)
Creates a new handler
boolean
defineLevel(String name, String value)
It defines a new Level with a name and a string value.
boolean
defineLevel(String name, int value)
It defines a new Level with a name and an integer value.
Map
getAllHandlerAttributes()
It retrieves the attributes of all handlers
Map
getHandlerAttributes(String handlername)
It retrieves the attributes of an handler
String[]
getHandlerNames()
It retrieves name of all handler managed by this factory.
Level
getLevel(String name)
It retrieves a Level instance which the name is equals to the parameter.
Level
getLevel(int value)
It retrieves a Level instance which the integer value is equals to the parameter.
Level[]
getLevels()
It retrieves all Level instances defined in this manager.
LoggerInfo
getLogger(String loggername)
Creates a logger if it does not exist.
LoggerInfo
getLogger(String key, String resourceBundleName)
Creates a logger if it does not exist.
LoggerInfo[]
getLoggers()
It retrieves a list of all loggers.
Properties
getMonologProperties()
String
getResourceBundleName()
Accessors to a resource bundle name associated to a LoggerFactory.
void
removeAllHandlersFromLogger(String loggerName)
A TopicalLogger manages a list of Handler instances.
boolean
removeHandler(String handlername)
It removes the handler which the name is specified by the parameter
void
removeHandlerFromLogger(String handlerName, String loggerName)
A TopicalLogger manages a list of Handler instances.
void
removeLevel(String name)
It removes a Level instance to this manager.
void
removeTopicFromLogger(String topic, String loggerName)
This method allows removing a topic to a TopicalLogger.
void
setAdditivity(boolean a, String loggerName)
It assigns the additivity flag for this logger instance.
void
setHandlerAttribute(String handlername, String attributeName, String value)
Assignes a value to an handler attribute.
void
setResourceBundleName(String resourceBundleName)
Accessors to a resource bundle name associated to a LoggerFactory.

Method Details

addHandlerToLogger

public void addHandlerToLogger(String handlerName,
                               String loggerName)
            throws RemoteException
A TopicalLogger manages a list of Handler instances. This method allows adding a handler to this list. The addHandler method returns true only if the Handler did not exist


addTopicToLogger

public void addTopicToLogger(String topic,
                             String loggerName)
            throws RemoteException
This method allows adding a topic to a TopicalLogger. This actions change the hierarchical structure, but also the list of handlers. The list of handlers of a TopicalLogger is composed of its handlers and all handlers inherited from its parents. Adding a topic changes the inherited handlers list.


compareTo

public int compareTo(String levelname1,
                     String levelname2)
            throws RemoteException
Compares two levels.

Parameters:
levelname1 - is the name of the first level
levelname2 - is the name of the second level


createHandler

public boolean createHandler(String hn,
                             String handlertype)
            throws RemoteException
Creates a new handler

Parameters:
hn - is the name of the handler to create
handlertype - is the type of the parameter. The possible value are defined in this interface by the XXX_HANDLER_TYPE constants.

Returns:
true if the handler has been created


defineLevel

public boolean defineLevel(String name,
                           String value)
            throws RemoteException
It defines a new Level with a name and a string value. The string value is analyzed to obtain the integer value.

Parameters:
name - is the name of the new level
value - is the string value of the new level

Returns:
true if the level has been created.


defineLevel

public boolean defineLevel(String name,
                           int value)
            throws RemoteException
It defines a new Level with a name and an integer value.

Parameters:
name - is the name of the new level
value - is the integer value of the new level

Returns:
true if the level has been created.


getAllHandlerAttributes

public Map getAllHandlerAttributes()
            throws RemoteException
It retrieves the attributes of all handlers

Returns:
Map( String handlername, Map(String attributename, String attributevalue) )


getHandlerAttributes

public Map getHandlerAttributes(String handlername)
            throws RemoteException
It retrieves the attributes of an handler

Parameters:
handlername - is the name of the handler

Returns:
a map containing the association between an attribute name (String) and an attribute value (String).


getHandlerNames

public String[] getHandlerNames()
            throws RemoteException
It retrieves name of all handler managed by this factory.


getLevel

public Level getLevel(String name)
            throws RemoteException
It retrieves a Level instance which the name is equals to the parameter.

Parameters:
name - is the name of request Level

Returns:
a Leve instance or a null value if the level does not exist.


getLevel

public Level getLevel(int value)
            throws RemoteException
It retrieves a Level instance which the integer value is equals to the parameter.

Parameters:
value - is the integer value of request Level

Returns:
a Leve instance or a null value if the level does not exist. As it is possible to define several Levels which have the same integer value this methods returns the Level instance of first name found in the list.


getLevels

public Level[] getLevels()
            throws RemoteException
It retrieves all Level instances defined in this manager.


getLogger

public LoggerInfo getLogger(String loggername)
            throws RemoteException
Creates a logger if it does not exist.

Parameters:
loggername - is the name of the logger


getLogger

public LoggerInfo getLogger(String key,
                            String resourceBundleName)
            throws RemoteException
Creates a logger if it does not exist.

Parameters:
resourceBundleName - allows specifying the name of a resource bundle in order to internationalise the logging.


getLoggers

public LoggerInfo[] getLoggers()
            throws RemoteException
It retrieves a list of all loggers.


getMonologProperties

public Properties getMonologProperties()
            throws RemoteException


getResourceBundleName

public String getResourceBundleName()
            throws RemoteException
Accessors to a resource bundle name associated to a LoggerFactory.


removeAllHandlersFromLogger

public void removeAllHandlersFromLogger(String loggerName)
            throws RemoteException
A TopicalLogger manages a list of Handler instances. This method allows removing all handler.


removeHandler

public boolean removeHandler(String handlername)
            throws RemoteException
It removes the handler which the name is specified by the parameter

Parameters:
handlername - is the name of the handler

Returns:
true if the handler has been removed.


removeHandlerFromLogger

public void removeHandlerFromLogger(String handlerName,
                                    String loggerName)
            throws RemoteException
A TopicalLogger manages a list of Handler instances. This method allows removing a handler to this list.


removeLevel

public void removeLevel(String name)
            throws RemoteException
It removes a Level instance to this manager.


removeTopicFromLogger

public void removeTopicFromLogger(String topic,
                                  String loggerName)
            throws RemoteException
This method allows removing a topic to a TopicalLogger. This actions change the hierarchical structure, but also the list of handlers. The list of handlers of a TopicalLogger is composed of its handlers and all handlers inherited from its parents. Removing a topic changes the inherited handlers list.


setAdditivity

public void setAdditivity(boolean a,
                          String loggerName)
            throws RemoteException
It assigns the additivity flag for this logger instance.


setHandlerAttribute

public void setHandlerAttribute(String handlername,
                                String attributeName,
                                String value)
            throws RemoteException
Assignes a value to an handler attribute.

Parameters:
handlername - is the name of the handler
attributeName - is the name of the attribute
value - is the new value of the attribute


setResourceBundleName

public void setResourceBundleName(String resourceBundleName)
            throws RemoteException
Accessors to a resource bundle name associated to a LoggerFactory.