org.apache.cocoon.profiler.debugging
Class Debugger

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.cocoon.profiler.debugging.Debugger
All Implemented Interfaces:
Contextualizable, Disposable, Initializable, LogEnabled, Serviceable

public class Debugger
extends AbstractLogEnabled
implements Serviceable, Disposable, Initializable, Contextualizable

This is an experimental debugger.

Since:
2.2
Version:
$Id: Debugger.java 239572 2005-08-24 08:37:42Z cziegeler $

Nested Class Summary
protected static class Debugger.RequestWrapper
          We wrap the request to remove the request parameter from the list of parameters.
 
Field Summary
protected  Context context
           
protected static String DEBUGGER_KEY
           
protected  String debugInfo
           
protected  boolean finished
           
protected  String information
           
protected  ServiceManager manager
           
protected  DOMParser parser
           
protected  XPathProcessor processor
           
protected  BufferedReader reader
           
static String REQUEST_PARAMETER
           
protected static String SITEMAP_COUNTER_KEY
           
protected  Socket socket
           
protected  PrintWriter writer
           
 
Constructor Summary
Debugger()
           
 
Method Summary
 void addNamedInformation(String name, Map info)
           
protected  void calcInfo()
          Calculate the current information string
 void clearInformation()
           
 void close()
          Close the connection
 void contextualize(Context context)
           
static Integer decSitemapCounter(Map objectModel)
           
 void dispose()
           
static Debugger getDebugger(Map objectModel)
          Get the debugger
static Integer getSitemapCounter(Map objectModel)
           
static Integer incSitemapCounter(Map objectModel)
           
 void initialize()
           
 void popInformation()
           
 void pushInformation(Map infoMap)
           
 void send(String value)
           
 void sendFinal(String value)
           
 void sendSitemapElement(String type, String configuration)
           
 void sendSitemapElement(String type, String configuration, Parameters p)
           
 void service(ServiceManager manager)
           
 void setDebugInfo(String value)
           
static String xmlElement(String name, String text)
           
static String xmlText(String text)
           
 
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

DEBUGGER_KEY

protected static final String DEBUGGER_KEY

SITEMAP_COUNTER_KEY

protected static final String SITEMAP_COUNTER_KEY

REQUEST_PARAMETER

public static final String REQUEST_PARAMETER
See Also:
Constant Field Values

writer

protected PrintWriter writer

reader

protected BufferedReader reader

information

protected String information

socket

protected Socket socket

manager

protected ServiceManager manager

parser

protected DOMParser parser

processor

protected XPathProcessor processor

debugInfo

protected String debugInfo

finished

protected boolean finished

context

protected Context context
Constructor Detail

Debugger

public Debugger()
Method Detail

contextualize

public void contextualize(Context context)
                   throws ContextException
Specified by:
contextualize in interface Contextualizable
Throws:
ContextException
See Also:
Contextualizable.contextualize(org.apache.avalon.framework.context.Context)

service

public void service(ServiceManager manager)
             throws ServiceException
Specified by:
service in interface Serviceable
Throws:
ServiceException
See Also:
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)

initialize

public void initialize()
                throws Exception
Specified by:
initialize in interface Initializable
Throws:
Exception
See Also:
Initializable.initialize()

dispose

public void dispose()
Specified by:
dispose in interface Disposable
See Also:
Disposable.dispose()

setDebugInfo

public void setDebugInfo(String value)

sendFinal

public void sendFinal(String value)

send

public void send(String value)

close

public void close()
Close the connection


sendSitemapElement

public void sendSitemapElement(String type,
                               String configuration)

sendSitemapElement

public void sendSitemapElement(String type,
                               String configuration,
                               Parameters p)

pushInformation

public void pushInformation(Map infoMap)

popInformation

public void popInformation()

clearInformation

public void clearInformation()

calcInfo

protected void calcInfo()
Calculate the current information string


getDebugger

public static Debugger getDebugger(Map objectModel)
Get the debugger


getSitemapCounter

public static Integer getSitemapCounter(Map objectModel)

incSitemapCounter

public static Integer incSitemapCounter(Map objectModel)

decSitemapCounter

public static Integer decSitemapCounter(Map objectModel)

addNamedInformation

public void addNamedInformation(String name,
                                Map info)
Parameters:
name -
info -

xmlText

public static String xmlText(String text)

xmlElement

public static String xmlElement(String name,
                                String text)


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.