util.rmi
Interface SyslogAdjusting

All Superinterfaces:
Remote
All Known Implementing Classes:
LoggerTest, PropertySyslog

public interface SyslogAdjusting
extends Remote

An interface defining functionality to change system-logger properties. This allows on-the-fly change of logging levels and adding/removing of loggers.

Because Sysloggers are not explicetly guaranteed to be serializable, adding and removing a logger is not aiming at the logger itself, but adding is done with providing the server with the new logger's properties. Removing is done using the name of the logger.

A class that allows access to a syslog-adjusting server is SyslogAdmin.


Method Summary
 boolean addLogger(Map<String,String> log)
          Adds a syslogger.
 void disableLogging()
          Disables all loggings.
 void enableLogging()
          Enables all loggings.
 List<String> getAllLoggers()
          Returns a list of all logger names.
 com.protomatter.syslog.LogPolicy getLoggerPolicy(String name)
          Returns a reference to the Syslogger's log policy using the name of the logger.
 void removeAllLoggers()
          Removes all loggers.
 boolean removeLogger(String name)
          Removes a logger.
 boolean setLoggerPolicy(String name, com.protomatter.syslog.LogPolicy policy)
          Sets the Syslogger's log policy using the name of the logger.
 

Method Detail

getLoggerPolicy

com.protomatter.syslog.LogPolicy getLoggerPolicy(String name)
                                                 throws RemoteException
Returns a reference to the Syslogger's log policy using the name of the logger.

Throws:
RemoteException

setLoggerPolicy

boolean setLoggerPolicy(String name,
                        com.protomatter.syslog.LogPolicy policy)
                        throws RemoteException
Sets the Syslogger's log policy using the name of the logger.

Throws:
RemoteException

getAllLoggers

List<String> getAllLoggers()
                           throws RemoteException
Returns a list of all logger names.

Throws:
RemoteException

removeLogger

boolean removeLogger(String name)
                     throws RemoteException
Removes a logger.

Returns:
True, if a logger was found and successfully removed.
Throws:
RemoteException

removeAllLoggers

void removeAllLoggers()
                      throws RemoteException
Removes all loggers.

Throws:
RemoteException

addLogger

boolean addLogger(Map<String,String> log)
                  throws RemoteException
Adds a syslogger. Our use of the loggers are more strict in a way that any logger should have its distinct name. Adding the logger should therfore fail, if a logger of the given logger's name is already registered.

Returns:
True, if adding the logger was successful
Throws:
RemoteException

disableLogging

void disableLogging()
                    throws RemoteException
Disables all loggings.

Throws:
RemoteException

enableLogging

void enableLogging()
                   throws RemoteException
Enables all loggings.

Throws:
RemoteException