qx.log.appender
Class RingBuffer

java.lang.Object
  extended by qx.core.Object
      extended by qx.log.LogEventProcessor
          extended by qx.log.appender.Abstract
              extended by qx.log.appender.RingBuffer

public class RingBuffer
extends Abstract

An appender that writes all messages to a memory container. The messages can be retrieved later, f. i. when an error dialog pops up and the question arises what actions have caused the error.


Constructor Summary
RingBuffer()
           
 
Method Summary
 void _applyMaxMessages(java.lang.Object value, java.lang.Object old)
           
 void appendLogEvent(java.lang.Object evt)
          Appends a log event to the log.
 java.lang.String formatLogEvents(java.lang.Integer count)
          Returns a string holding the information of log events which have been logged previously.
 java.lang.Integer getMaxMessages()
          Returns the (computed) value of the property maxMessages.
 void initMaxMessages(java.lang.Integer arg)
          Calls the apply method and dispatches the change event of the property maxMessages with the default value defined by the class developer.
 void resetMaxMessages()
          Resets the user value of the property maxMessages.
 java.lang.Object retrieveLogEvents(java.lang.Integer count)
          Returns log events which have been logged previously.
 void setMaxMessages(java.lang.Integer arg)
          Sets the user value of the property maxMessages.
 
Methods inherited from class qx.log.appender.Abstract
formatLogEvent, getUseLongFormat, handleLogEvent, initUseLongFormat, isUseLongFormat, resetUseLongFormat, setUseLongFormat, toggleUseLongFormat
 
Methods inherited from class qx.log.LogEventProcessor
_getDefaultFilter, addFilter, clearFilters, decideLogEvent, getHeadFilter, setEnabled, setMinLevel
 
Methods inherited from class qx.core.Object
_disposeFields, _disposeObjectDeep, _disposeObjects, base, dispose, get, getDisposed, isDisposed, reset, self, set, toHashCode, toString_
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RingBuffer

public RingBuffer()
Method Detail

_applyMaxMessages

public void _applyMaxMessages(java.lang.Object value,
                              java.lang.Object old)

appendLogEvent

public void appendLogEvent(java.lang.Object evt)
Description copied from class: Abstract

Appends a log event to the log.

Overrides:
appendLogEvent in class Abstract

formatLogEvents

public java.lang.String formatLogEvents(java.lang.Integer count)

Returns a string holding the information of log events which have been logged previously.


getMaxMessages

public java.lang.Integer getMaxMessages()

Returns the (computed) value of the property maxMessages.

For further details take a look at the property definition: maxMessages.


initMaxMessages

public void initMaxMessages(java.lang.Integer arg)

Calls the apply method and dispatches the change event of the property maxMessages with the default value defined by the class developer. This function can only be called from the constructor of a class.

For further details take a look at the property definition: maxMessages.


resetMaxMessages

public void resetMaxMessages()

Resets the user value of the property maxMessages.

The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.

For further details take a look at the property definition: maxMessages.


retrieveLogEvents

public java.lang.Object retrieveLogEvents(java.lang.Integer count)

Returns log events which have been logged previously.


setMaxMessages

public void setMaxMessages(java.lang.Integer arg)

Sets the user value of the property maxMessages.

For further details take a look at the property definition: maxMessages.



Copyright © 2008 1&1. All Rights Reserved.