org.apache.commons.monitoring.reporting
Class TxtRenderer

java.lang.Object
  extended by org.apache.commons.monitoring.reporting.AbstractRenderer
      extended by org.apache.commons.monitoring.reporting.TxtRenderer
All Implemented Interfaces:
Renderer

public class TxtRenderer
extends AbstractRenderer

A simple TXT renderer, typically to dump monitoring status in a log file

Author:
Nicolas De Loof

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.commons.monitoring.reporting.Renderer
Renderer.Options
 
Field Summary
 
Fields inherited from class org.apache.commons.monitoring.reporting.AbstractRenderer
MONITORS, ROLES
 
Fields inherited from interface org.apache.commons.monitoring.reporting.Renderer
DEFAULT_ROLES
 
Constructor Summary
TxtRenderer()
           
 
Method Summary
 void render(Context ctx, Monitor.Key key)
          
 void render(Context ctx, StatValue value, Renderer.Options options)
          
protected  void render(Context ctx, StatValue value, java.lang.String attribute, java.lang.Number number, Renderer.Options options, int ratio)
          Render a StatValue attribute
protected  void renderDetached(Context ctx, Detachable detached, Renderer.Options options)
          
 
Methods inherited from class org.apache.commons.monitoring.reporting.AbstractRenderer
getContentType, getOrderedStatValues, getRoles, hasNext, isDetatched, prepareRendering, render, render, render, render, renderMissingValue, renderNaN, renderStatValues, renderStatValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TxtRenderer

public TxtRenderer()
Method Detail

renderDetached

protected void renderDetached(Context ctx,
                              Detachable detached,
                              Renderer.Options options)

Specified by:
renderDetached in class AbstractRenderer
See Also:
org.apache.commons.monitoring.reporting.AbstractRenderer#renderDetached(org.apache.commons.monitoring.reporting.Context, org.apache.commons.monitoring.listeners.SecondaryMonitor, org.apache.commons.monitoring.reporting.Renderer.Options)

render

public void render(Context ctx,
                   StatValue value,
                   Renderer.Options options)

Overrides:
render in class AbstractRenderer
See Also:
org.apache.commons.monitoring.reporting.AbstractRenderer#render(Context, java.lang.String)

render

protected void render(Context ctx,
                      StatValue value,
                      java.lang.String attribute,
                      java.lang.Number number,
                      Renderer.Options options,
                      int ratio)
Description copied from class: AbstractRenderer
Render a StatValue attribute

Overrides:
render in class AbstractRenderer
Parameters:
ctx - output
value - the StatValue that hold data to be rendered
attribute - the StatValue attribute name to be rendered
number - the the StatValue attribute value to be rendered
options - the rendering options
ratio - the ratio between attribute unit and statValue unit (in power of 10)

render

public void render(Context ctx,
                   Monitor.Key key)

Specified by:
render in class AbstractRenderer
See Also:
org.apache.commons.monitoring.reporting.AbstractRenderer#render(org.apache.commons.monitoring.Monitor.Key)


Copyright © 2008 The Apache Software Foundation. All Rights Reserved.