|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.nitido.nim.NiMKernelService
com.nitido.nim.EventMonitorService
com.nitido.nimx.services.eventmonitor.log4j.EventMonitorServiceImpl
public class EventMonitorServiceImpl
This class implements the EventMonitorService such that application level events are placed in a file on the local file system of the running node using log4j as the underlying library for writting the log messages.
| Field Summary | |
|---|---|
static java.lang.String |
CONF_KEY_PREFIX
The configuration key prefix for the mapping settings from a user space key to a LDAP attribute name. |
static java.lang.String |
EVENTSTR_LOG_EVENT
The name of the logEvent request |
static int |
LEN_CONF_KEY_PREFIX
The length of the string CONF_KEY_PREFIX. |
static java.lang.String |
LOG_CAT_PREFIX
Category prefix used by NiM for loging application level events. |
static java.lang.String |
PREFIX_LOG4J
Just the string "log4j.". |
| Constructor Summary | |
|---|---|
EventMonitorServiceImpl(NiMKernelServiceVisa visa)
This class constructor is used by NiMKernel to instantiate a new EventMonitorService |
|
| Method Summary | |
|---|---|
protected void |
init(NiMKernel kernel,
ConfigurationService confService)
This method is used by the NiMKernel to initialize the EventMonitor service. |
void |
logEvent(java.lang.String eventName,
java.lang.String msg,
Credential credential)
This method is used to log the given message for the given event name. |
boolean |
needToLogEvent(java.lang.String eventName,
Credential credential)
This method indicates whether the given event needs to be logged. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String LOG_CAT_PREFIX
public static final java.lang.String EVENTSTR_LOG_EVENT
public static final java.lang.String CONF_KEY_PREFIX
public static final int LEN_CONF_KEY_PREFIX
public static final java.lang.String PREFIX_LOG4J
| Constructor Detail |
|---|
public EventMonitorServiceImpl(NiMKernelServiceVisa visa)
visa - Reference to the NiMKernelServiceVisa object required to
instantiate the service. This parameter is required to
ensure that only the NiMkernel can instantiate a reference
to this service.| Method Detail |
|---|
protected void init(NiMKernel kernel,
ConfigurationService confService)
throws InitializationFailedException,
NiMException
init in class EventMonitorServicekernel - Reference to the kernel that instantiated this service.confService - Reference to the ConfigurationService
InitializationFailedException - If unable to initialize the service. This exception is
never thrown by this service implementation.
NiMException - If unable to establish a connection with the underlying log
service. This exception is never thrown by this service
implementation.
public void logEvent(java.lang.String eventName,
java.lang.String msg,
Credential credential)
logEvent in class EventMonitorServiceeventName - The name of the event to be logged.msg - The message associated with the event being loggedcredential - The credential of the user logging the event.
public boolean needToLogEvent(java.lang.String eventName,
Credential credential)
The creation of the log message can consume a significant amount of time, a developer can first call this method to determine whether the corresponding log message is to be logged.
needToLogEvent in class EventMonitorServiceeventName - The name that uniquely identifies the event to be logged.credential - The credential of the user logging the event
|
Nitido NiM 2.5 Java API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 1999-2009 Nitido Inc. Proprietary and Confidential. All Rights Reserved.