tools/slee-management-console/server/src/main/java/org/mobicents/slee/container/management/console/server/mbeans/LogManagementMBeanUtils.java
public void addNotificationHandler(String loggerName, int numberOfEntries, Level level, String formaterClassName, String filterClassName)
      throws IllegalArgumentException, IllegalStateException, NullPointerException, ManagementConsoleException {

    try {
      this.mbeanServer.invoke(logMgmtMBeanName, "addNotificationHandler",
          new Object[] { loggerName, numberOfEntries, level, formaterClassName, filterClassName }, new String[] { "java.lang.String", "int",
              "java.util.logging.Logger", "java.lang.String", "java.lang.String" });
    }
    catch (Exception e) {
      e.printStackTrace();
      throw new ManagementConsoleException(SleeManagementMBeanUtils.doMessage(e));
    }

  }
public void addNotificationHandler(String loggerName, int numberOfEntries, Level level, String formaterClassName, String filterClassName)
      throws IllegalArgumentException, IllegalStateException, NullPointerException, ManagementConsoleException {

    try {
      this.mbeanServer.invoke(logMgmtMBeanName, "addNotificationHandler",
          new Object[] { loggerName, numberOfEntries, level, formaterClassName, filterClassName }, new String[] { "java.lang.String", "int",
              "java.util.logging.Logger", "java.lang.String", "java.lang.String" });
    }
    catch (Exception e) {
      e.printStackTrace();
      throw new ManagementConsoleException(SleeManagementMBeanUtils.doMessage(e));
    }

  }
Adds notification handler to logger if it exists. Its name is set to <b>NOTIFICATION</b>. There can be only one notification handler.
This handler holds reference to up to numberOfEntries log entries and fires notification. Notification can be triggered prematurely in
case when someone calls fetchLogContent function, this will cause notification to be fired along with log entries return as outcome of
invocation.

@param loggerName
- name of the logger, it must exists prior this function call
@param numberOfEntries
- number of log entries after notification is sent. If <=0 default value is used
@param level
- level for this handler, if null, default value is used
@param formaterClassName
- name of formater class for this handler, can be null.
@param filterClassName
- name of filter class for this handler, can be null.
@throws IllegalArgumentException
thrown when:
<ul>
<li>logger under certain name does not exist</li>
<li>formaterClassName is not valid formater class</li>
<li>filterClassName is not valid filter class</li>
</ul>
@throws IllegalStateException
- logger under that name already has notification handler
@throws NullPointerException
- loggerName is null