com.xpn.xwiki.monitor.api
Class MonitorPlugin

java.lang.Object
  extended by com.xpn.xwiki.plugin.XWikiDefaultPlugin
      extended by com.xpn.xwiki.monitor.api.MonitorPlugin
All Implemented Interfaces:
XWikiPluginInterface

public class MonitorPlugin
extends XWikiDefaultPlugin


Constructor Summary
MonitorPlugin(String name, String className, XWikiContext context)
           
 
Method Summary
 void endRequest()
           
 void endTimer(String timername)
           
 Map getActiveTimerData()
           
 long getDuration()
           
 long getDuration(String timer)
           
 org.apache.commons.collections.buffer.CircularFifoBuffer getLastTimerData()
           
 org.apache.commons.collections.buffer.CircularFifoBuffer getLastUnfinishedTimerData()
           
 String getName()
          The name which can be used for accessing this plugin from XWiki.getPlugin(String, XWikiContext).
 long getNbCalls(String timer)
           
 long getRequests()
           
 long getRequests(String timer)
           
 Map getTimerSummaries()
           
 void init(XWikiContext context)
          Global initialization, called when the platform is started and the plugin list is initialized.
 boolean isActive()
           
 void reset(XWikiContext context)
           
 void setActive(boolean bActive)
           
 void setTimerDesc(String timername, String desc)
           
 void setWikiPage(String page)
           
 void startRequest(String page, String action, URL url)
           
 void startTimer(String timername)
           
 void startTimer(String timername, String desc)
           
 
Methods inherited from class com.xpn.xwiki.plugin.XWikiDefaultPlugin
beginParsing, beginRendering, commonTagsHandler, downloadAttachment, endParsing, endRendering, endRenderingHandler, flushCache, flushCache, getClassName, getPluginApi, insidePREHandler, outsidePREHandler, setClassName, setName, startRenderingHandler, virtualInit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonitorPlugin

public MonitorPlugin(String name,
                     String className,
                     XWikiContext context)
Method Detail

init

public void init(XWikiContext context)
Description copied from interface: XWikiPluginInterface
Global initialization, called when the platform is started and the plugin list is initialized.

Specified by:
init in interface XWikiPluginInterface
Overrides:
init in class XWikiDefaultPlugin
Parameters:
context - the current context, should not be stored since it will become mostly unreliable once the initial request is terminated

reset

public void reset(XWikiContext context)

getName

public String getName()
Description copied from interface: XWikiPluginInterface
The name which can be used for accessing this plugin from XWiki.getPlugin(String, XWikiContext).

Specified by:
getName in interface XWikiPluginInterface
Overrides:
getName in class XWikiDefaultPlugin
Returns:
the plugin name, usually a lowercase identifier

startRequest

public void startRequest(String page,
                         String action,
                         URL url)

endRequest

public void endRequest()

setWikiPage

public void setWikiPage(String page)

getLastTimerData

public org.apache.commons.collections.buffer.CircularFifoBuffer getLastTimerData()

getLastUnfinishedTimerData

public org.apache.commons.collections.buffer.CircularFifoBuffer getLastUnfinishedTimerData()

startTimer

public void startTimer(String timername)

startTimer

public void startTimer(String timername,
                       String desc)

setTimerDesc

public void setTimerDesc(String timername,
                         String desc)

endTimer

public void endTimer(String timername)

getActiveTimerData

public Map getActiveTimerData()

getTimerSummaries

public Map getTimerSummaries()

getDuration

public long getDuration()

getRequests

public long getRequests()

getDuration

public long getDuration(String timer)

getNbCalls

public long getNbCalls(String timer)

getRequests

public long getRequests(String timer)

isActive

public boolean isActive()

setActive

public void setActive(boolean bActive)


Copyright © 2004-2013 XWiki. All Rights Reserved.