org.specrunner.listeners.core
Class ProfilerPluginListener

java.lang.Object
  extended by org.specrunner.listeners.core.ProfilerPluginListener
All Implemented Interfaces:
IPluginListener, ISpecRunnerListener

public class ProfilerPluginListener
extends Object
implements IPluginListener

Logging profiler implementation.

Author:
Thiago Santos.

Constructor Summary
ProfilerPluginListener()
           
 
Method Summary
 String getName()
          The listener name.
 Map<ActionType,Long> getTimeByType()
          The mapping of time by action type.
 void onAfterEnd(IPlugin plugin, IContext context, IResultSet result)
          Perform some action after plugin ending.
 void onAfterInit(IPlugin plugin, IContext context, IResultSet result)
          Perform some action after plugin initialization.
 void onAfterStart(IPlugin plugin, IContext context, IResultSet result)
          Perform some action after plugin start.
 void onBeforeEnd(IPlugin plugin, IContext context, IResultSet result)
          Perform some action before plugin ending.
 void onBeforeInit(IPlugin plugin, IContext context, IResultSet result)
          Perform some action before plugin initialization.
 void onBeforeStart(IPlugin plugin, IContext context, IResultSet result)
          Perform some action before plugin start.
 void reset()
          Reset listener state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfilerPluginListener

public ProfilerPluginListener()
Method Detail

getName

public String getName()
Description copied from interface: ISpecRunnerListener
The listener name. Used to distinguish between different listeners.

Specified by:
getName in interface ISpecRunnerListener
Returns:
The listener name.

reset

public void reset()
Description copied from interface: ISpecRunnerListener
Reset listener state.

Specified by:
reset in interface ISpecRunnerListener

onBeforeInit

public void onBeforeInit(IPlugin plugin,
                         IContext context,
                         IResultSet result)
Description copied from interface: IPluginListener
Perform some action before plugin initialization.

Specified by:
onBeforeInit in interface IPluginListener
Parameters:
plugin - The plugin instance.
context - The context.
result - The result.

onAfterInit

public void onAfterInit(IPlugin plugin,
                        IContext context,
                        IResultSet result)
Description copied from interface: IPluginListener
Perform some action after plugin initialization.

Specified by:
onAfterInit in interface IPluginListener
Parameters:
plugin - The plugin instance.
context - The context.
result - The result.

onBeforeStart

public void onBeforeStart(IPlugin plugin,
                          IContext context,
                          IResultSet result)
Description copied from interface: IPluginListener
Perform some action before plugin start.

Specified by:
onBeforeStart in interface IPluginListener
Parameters:
plugin - The plugin instance.
context - The context.
result - The result.

onAfterStart

public void onAfterStart(IPlugin plugin,
                         IContext context,
                         IResultSet result)
Description copied from interface: IPluginListener
Perform some action after plugin start.

Specified by:
onAfterStart in interface IPluginListener
Parameters:
plugin - The plugin instance.
context - The context.
result - The result.

onBeforeEnd

public void onBeforeEnd(IPlugin plugin,
                        IContext context,
                        IResultSet result)
Description copied from interface: IPluginListener
Perform some action before plugin ending.

Specified by:
onBeforeEnd in interface IPluginListener
Parameters:
plugin - The plugin instance.
context - The context.
result - The result.

onAfterEnd

public void onAfterEnd(IPlugin plugin,
                       IContext context,
                       IResultSet result)
Description copied from interface: IPluginListener
Perform some action after plugin ending.

Specified by:
onAfterEnd in interface IPluginListener
Parameters:
plugin - The plugin instance.
context - The context.
result - The result.

getTimeByType

public Map<ActionType,Long> getTimeByType()
The mapping of time by action type.

Returns:
The mapping.


Copyright © 2014. All rights reserved.