|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jonas.lib.jmbeans.log.LogBuffer
public class LogBuffer
THis MBean receives and treats LogRecords contained in notifications emitted by the Monolog JmxHandler. The treatement is aimed to provided structured data for JonasAdmin.
| Field Summary |
|---|
| Fields inherited from interface org.ow2.jonas.lib.jmbeans.log.LogBufferMBean |
|---|
INFO, SEVERE, WARNING |
| Constructor Summary | |
|---|---|
LogBuffer(String name)
The MBean constructor. |
|
| Method Summary | |
|---|---|
protected void |
addToLogRecordsQueue(LogRecord record)
Add a LogRecord to the queue |
protected void |
addToRecentLog(LogRecord record)
Add a LogRecord to the recent recors list |
StringBuffer |
fetchRecords()
Fetch records |
StringBuffer |
fetchRecords(Long from,
Long to)
|
StringBuffer |
fetchRecords(Long from,
Long to,
int level)
|
int |
getCapacity()
|
long |
getInfoCount()
|
long |
getLatestDate()
|
int |
getLevel()
Not used currently. |
long |
getOldestDate()
|
long |
getOtherCount()
|
String |
getRecent()
|
int |
getRecentCapacity()
|
long |
getRecordCount()
|
long |
getSevereCount()
|
long |
getWarningCount()
|
protected void |
incInfoCount()
Increment counter of received LogRecords having INFO level |
protected void |
incOtherCount()
Increment counter of received LogRecords having level different of INFO, WARNING, SEVERE |
protected void |
incRecordCount()
Increment counter of received LogRecors |
protected void |
incSevereCount()
Increment counter of received LogRecords having SEVERE level |
protected void |
incWarningCount()
Increment counter of received LogRecords having WARNING level |
void |
postDeregister()
Nothing to do after deregisteing |
void |
postRegister(Boolean arg0)
After registering, add LogNotificationListener as listener for notifications emitted by the LogManagement MBean |
void |
preDeregister()
Before deregistering, remove LogNotificationListener listener |
ObjectName |
preRegister(MBeanServer mbs,
ObjectName on)
Allows getting a refernce to the MBean server, getting the domain name, and if necessary, constructing an ObjectName |
void |
setCapacity(int records)
Max number of records to hold (max records of the feeder) |
protected void |
setLatestDate(long latestDate)
|
void |
setLevel(int level)
|
void |
setOldestDate(long oldestDate)
|
void |
setRecentCapacity(int recentCapacity)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LogBuffer(String name)
name - the name used to construct the ObjectName| Method Detail |
|---|
public StringBuffer fetchRecords()
LogBufferMBean
fetchRecords in interface LogBufferMBean
public StringBuffer fetchRecords(Long from,
Long to)
fetchRecords in interface LogBufferMBeanfrom - the LogRecord inferior time limitto - the LogRecord upper time limit
public StringBuffer fetchRecords(Long from,
Long to,
int level)
fetchRecords in interface LogBufferMBeanfrom - the LogRecord inferior time limitto - the LogRecord upper time limitlevel - ...
public int getCapacity()
getCapacity in interface LogBufferMBeanpublic long getInfoCount()
getInfoCount in interface LogBufferMBeanprotected void incInfoCount()
public int getLevel()
getLevel in interface LogBufferMBeanpublic long getRecordCount()
getRecordCount in interface LogBufferMBeanprotected void incRecordCount()
public long getSevereCount()
getSevereCount in interface LogBufferMBeanprotected void incSevereCount()
public long getWarningCount()
getWarningCount in interface LogBufferMBeanprotected void incWarningCount()
public long getOtherCount()
getOtherCount in interface LogBufferMBeanprotected void incOtherCount()
public long getLatestDate()
getLatestDate in interface LogBufferMBeanpublic void setCapacity(int records)
LogBufferMBean
setCapacity in interface LogBufferMBeanrecords - the capacity of the recordSetpublic void setLevel(int level)
setLevel in interface LogBufferMBeanpublic String getRecent()
getRecent in interface LogBufferMBeanpublic void postRegister(Boolean arg0)
postRegister in interface MBeanRegistrationarg0 - Indicates whether or not the MBean has been successfully registered
public ObjectName preRegister(MBeanServer mbs,
ObjectName on)
throws MalformedObjectNameException
preRegister in interface MBeanRegistrationmbs - refernce to the MBeanon - ObjectName provided by the creator of the MBean
MalformedObjectNameException - could not create ObjectName
public void preDeregister()
throws Exception
preDeregister in interface MBeanRegistrationException - pb. when deregisteringpublic void postDeregister()
postDeregister in interface MBeanRegistrationprotected void addToRecentLog(LogRecord record)
record - LogRecord to be addprotected void addToLogRecordsQueue(LogRecord record)
record - LogRecord to be addpublic int getRecentCapacity()
getRecentCapacity in interface LogBufferMBeanpublic void setRecentCapacity(int recentCapacity)
setRecentCapacity in interface LogBufferMBeanrecentCapacity - capacity of the recent LogRecord listprotected void setLatestDate(long latestDate)
public long getOldestDate()
getOldestDate in interface LogBufferMBeanpublic void setOldestDate(long oldestDate)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||