|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.nb.pogamut.base.logging.LogRecordsSource<T>
public abstract class LogRecordsSource<T>
Source of LogRecords, it caches incomming logrecords and provides observers new collection of records when filter changes. All incoming log records are being cached so when the filter changes the listeners are provided with a refiltered list of past log records.
| Nested Class Summary | |
|---|---|
static interface |
LogRecordsSource.Filter<T>
Interface for filtering messages. |
class |
LogRecordsSource.RegexpFilter<T>
Filter based on regexp matching the toString() of the object |
| Field Summary | |
|---|---|
protected List<LogRecordsSource.Filter<T>> |
filters
List of all filters. |
protected Set<LogRecordListener> |
listeners
|
protected LimitedQueue<LogRecord> |
queue
Queue of all log records. |
| Constructor Summary | |
|---|---|
LogRecordsSource()
|
|
| Method Summary | |
|---|---|
void |
addFilter(LogRecordsSource.Filter filter)
Change records filter and notify all listeners. |
void |
addLogRecordListener(LogRecordListener l)
|
protected void |
addMessage(T msg)
Adds new object to queue of objects. |
void |
clear()
Clears all log records. |
protected boolean |
filter(T msg)
|
protected Collection<LogRecord> |
getFilteredData()
Apply filter to all cached records and return this new collection. |
protected T |
getLogRecParam(LogRecord lr)
|
org.openide.nodes.Sheet.Set |
getPropSet()
Returns property sheet associated with node representing this source. |
protected void |
notifyLogRecordsListeners(LogRecord r)
Notify all listeners that new record has arrived. |
void |
notifySetNewData()
Send new data to all listeners. |
void |
notifySetNewData(LogRecordListener listener)
Send new data to one listeners. |
void |
removeFilter(LogRecordsSource.Filter filter)
|
void |
removeLogRecordListener(LogRecordListener l)
|
LogRecordsSource.Filter<T> |
replaceFilter(LogRecordsSource.Filter<T> oldFilter,
LogRecordsSource.Filter<T> newFilter)
|
void |
setRegexpFilterPatter(Pattern pattern)
Sets new pattern for regexp filter. |
protected abstract LogRecord |
toLogRecord(T t)
Format data element as LogRecord. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected List<LogRecordsSource.Filter<T>> filters
protected Set<LogRecordListener> listeners
protected LimitedQueue<LogRecord> queue
| Constructor Detail |
|---|
public LogRecordsSource()
| Method Detail |
|---|
public void addLogRecordListener(LogRecordListener l)
public void removeLogRecordListener(LogRecordListener l)
public void clear()
protected void notifyLogRecordsListeners(LogRecord r)
protected abstract LogRecord toLogRecord(T t)
public void notifySetNewData()
public void notifySetNewData(LogRecordListener listener)
protected Collection<LogRecord> getFilteredData()
protected boolean filter(T msg)
public LogRecordsSource.Filter<T> replaceFilter(LogRecordsSource.Filter<T> oldFilter,
LogRecordsSource.Filter<T> newFilter)
public void setRegexpFilterPatter(Pattern pattern)
public void addFilter(LogRecordsSource.Filter filter)
filter - new filterpublic void removeFilter(LogRecordsSource.Filter filter)
protected T getLogRecParam(LogRecord lr)
protected void addMessage(T msg)
public org.openide.nodes.Sheet.Set getPropSet()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||