org.apache.excalibur.instrument.manager.http
Class AbstractXMLHandler

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.excalibur.instrument.AbstractLogEnabledInstrumentable
          extended byorg.apache.excalibur.instrument.manager.http.server.AbstractHTTPURLHandler
              extended byorg.apache.excalibur.instrument.manager.http.server.AbstractHTTPURLPrintWriterHandler
                  extended byorg.apache.excalibur.instrument.manager.http.AbstractHandler
                      extended byorg.apache.excalibur.instrument.manager.http.AbstractXMLHandler
All Implemented Interfaces:
HTTPURLHandler, Instrumentable, LogEnabled
Direct Known Subclasses:
XMLCreateSampleHandler, XMLCreateSamplesHandler, XMLGCHandler, XMLInstrumentableHandler, XMLInstrumentHandler, XMLInstrumentManagerHandler, XMLSampleHandler, XMLSampleLeaseHandler, XMLSampleLeasesHandler, XMLSnapshotHandler, XMLSnapshotsHandler

public abstract class AbstractXMLHandler
extends AbstractHandler

Since:
4.1
Version:
CVS $Revision: 1.6 $ $Date: 2004/03/06 14:01:28 $
Author:
Avalon Development Team

Field Summary
protected static java.lang.String INDENT
           
 
Fields inherited from interface org.apache.excalibur.instrument.manager.http.server.HTTPURLHandler
CONTENT_TYPE_IMAGE_JPEG, CONTENT_TYPE_IMAGE_X_ICON, CONTENT_TYPE_TEXT_HTML, CONTENT_TYPE_TEXT_XML
 
Fields inherited from interface org.apache.excalibur.instrument.Instrumentable
EMPTY_INSTRUMENT_ARRAY, EMPTY_INSTRUMENTABLE_ARRAY
 
Constructor Summary
AbstractXMLHandler(java.lang.String path, DefaultInstrumentManager manager)
          Creates a new AbstractXMLHandler.
 
Method Summary
protected  java.lang.String makeSafeAttribute(java.lang.String attribute)
           
protected  void outputInstrument(java.io.PrintWriter out, InstrumentDescriptor instrument, java.lang.String indent, boolean recurse, boolean packed)
           
protected  void outputInstrumentable(java.io.PrintWriter out, InstrumentableDescriptor instrumentable, java.lang.String indent, boolean recurse, boolean packed)
           
protected  void outputInstrumentableBrief(java.io.PrintWriter out, InstrumentableDescriptor instrumentable, java.lang.String indent, boolean packed)
           
protected  void outputInstrumentBrief(java.io.PrintWriter out, InstrumentDescriptor instrument, java.lang.String indent, boolean packed)
           
protected  void outputInstrumentManager(java.io.PrintWriter out, DefaultInstrumentManager manager, java.lang.String indent, boolean recurse, boolean packed, boolean readOnly)
           
protected  void outputLine(java.io.PrintWriter out, java.lang.String indent, boolean packed, java.lang.String line)
           
protected  void outputSample(java.io.PrintWriter out, InstrumentSampleDescriptor sample, java.lang.String indent, boolean packed)
           
protected  void outputSampleBrief(java.io.PrintWriter out, InstrumentSampleDescriptor sample, java.lang.String indent, boolean packed)
           
protected  void outputSampleHistory(java.io.PrintWriter out, InstrumentSampleDescriptor sample, java.lang.String indent, long baseTime, boolean packed, boolean compact)
           
protected  java.lang.String replaceToken(java.lang.String str, java.lang.String oldToken, java.lang.String newToken)
          Replaces one token with another in a string.
 
Methods inherited from class org.apache.excalibur.instrument.manager.http.AbstractHandler
getInstrumentManager
 
Methods inherited from class org.apache.excalibur.instrument.manager.http.server.AbstractHTTPURLPrintWriterHandler
doGet, doGet
 
Methods inherited from class org.apache.excalibur.instrument.manager.http.server.AbstractHTTPURLHandler
getBooleanParameter, getBooleanParameter, getContentType, getEncoding, getIntegerParameter, getIntegerParameter, getIntegerParameters, getLongParameter, getLongParameter, getLongParameters, getParameter, getParameter, getParameters, getPath, handleRequest
 
Methods inherited from class org.apache.excalibur.instrument.AbstractLogEnabledInstrumentable
addChildInstrumentable, addInstrument, getChildInstrumentables, getInstrumentableName, getInstruments, setInstrumentableName
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INDENT

protected static final java.lang.String INDENT
See Also:
Constant Field Values
Constructor Detail

AbstractXMLHandler

public AbstractXMLHandler(java.lang.String path,
                          DefaultInstrumentManager manager)
Creates a new AbstractXMLHandler.

Parameters:
path - The path handled by this handler.
manager - Reference to the instrument manager interface.
Method Detail

replaceToken

protected final java.lang.String replaceToken(java.lang.String str,
                                              java.lang.String oldToken,
                                              java.lang.String newToken)
Replaces one token with another in a string.

Parameters:
str - String with tokens to be replaced.
oldToken - The token to be replaced.
newToken - The new token value.
Returns:
A new String that has had its tokens replaced.

makeSafeAttribute

protected final java.lang.String makeSafeAttribute(java.lang.String attribute)

outputLine

protected void outputLine(java.io.PrintWriter out,
                          java.lang.String indent,
                          boolean packed,
                          java.lang.String line)

outputInstrumentManager

protected void outputInstrumentManager(java.io.PrintWriter out,
                                       DefaultInstrumentManager manager,
                                       java.lang.String indent,
                                       boolean recurse,
                                       boolean packed,
                                       boolean readOnly)
                                throws java.io.IOException
Throws:
java.io.IOException

outputInstrumentableBrief

protected void outputInstrumentableBrief(java.io.PrintWriter out,
                                         InstrumentableDescriptor instrumentable,
                                         java.lang.String indent,
                                         boolean packed)
                                  throws java.io.IOException
Throws:
java.io.IOException

outputInstrumentable

protected void outputInstrumentable(java.io.PrintWriter out,
                                    InstrumentableDescriptor instrumentable,
                                    java.lang.String indent,
                                    boolean recurse,
                                    boolean packed)
                             throws java.io.IOException
Throws:
java.io.IOException

outputInstrumentBrief

protected void outputInstrumentBrief(java.io.PrintWriter out,
                                     InstrumentDescriptor instrument,
                                     java.lang.String indent,
                                     boolean packed)
                              throws java.io.IOException
Throws:
java.io.IOException

outputInstrument

protected void outputInstrument(java.io.PrintWriter out,
                                InstrumentDescriptor instrument,
                                java.lang.String indent,
                                boolean recurse,
                                boolean packed)
                         throws java.io.IOException
Throws:
java.io.IOException

outputSampleBrief

protected void outputSampleBrief(java.io.PrintWriter out,
                                 InstrumentSampleDescriptor sample,
                                 java.lang.String indent,
                                 boolean packed)
                          throws java.io.IOException
Throws:
java.io.IOException

outputSample

protected void outputSample(java.io.PrintWriter out,
                            InstrumentSampleDescriptor sample,
                            java.lang.String indent,
                            boolean packed)
                     throws java.io.IOException
Throws:
java.io.IOException

outputSampleHistory

protected void outputSampleHistory(java.io.PrintWriter out,
                                   InstrumentSampleDescriptor sample,
                                   java.lang.String indent,
                                   long baseTime,
                                   boolean packed,
                                   boolean compact)
                            throws java.io.IOException
Throws:
java.io.IOException


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.