org.qi4j.metrics.yammer
Class YammerMetricsAssembler

java.lang.Object
  extended by org.qi4j.metrics.yammer.YammerMetricsAssembler
All Implemented Interfaces:
Assembler

public class YammerMetricsAssembler
extends java.lang.Object
implements Assembler


Constructor Summary
YammerMetricsAssembler()
          Default constructor only creates a Yammer JMXReporter
YammerMetricsAssembler(java.io.File outDirectory, long period, java.util.concurrent.TimeUnit timeunit)
          Creates a CSV reporter and writes the result to the given directory
YammerMetricsAssembler(java.io.PrintStream out, long period, java.util.concurrent.TimeUnit timeunit)
          Creates a ConsoleReporter and sends the output to the given PrintStream.
 
Method Summary
 void assemble(ModuleAssembly module)
          Assemblers receive a callback to the ModuleAssembly they are supposed to configure.
 void shutdown()
          Closing any Reporter that has been started.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YammerMetricsAssembler

public YammerMetricsAssembler()
Default constructor only creates a Yammer JMXReporter


YammerMetricsAssembler

public YammerMetricsAssembler(java.io.PrintStream out,
                              long period,
                              java.util.concurrent.TimeUnit timeunit)
Creates a ConsoleReporter and sends the output to the given PrintStream.

Parameters:
out - The PrintStream to receive the output.
period - The reporting interval.
timeunit - The TimeUnit for the reporting interval.

YammerMetricsAssembler

public YammerMetricsAssembler(java.io.File outDirectory,
                              long period,
                              java.util.concurrent.TimeUnit timeunit)
Creates a CSV reporter and writes the result to the given directory

Parameters:
outDirectory - The directory to write the result to.
period - The reporting interval.
timeunit - The TimeUnit for the reporting interval.
Method Detail

assemble

public void assemble(ModuleAssembly module)
              throws AssemblyException
Description copied from interface: Assembler
Assemblers receive a callback to the ModuleAssembly they are supposed to configure. They can use this to register objects, composites, services etc. and the additional metadata that may exist for these artifacts.

An Assembler may create new Modules by calling ModuleAssembly.layer() and then LayerAssembly.module(String) (String)}. This allows an Assembler to bootstrap an entire Layer with more Modules.

Specified by:
assemble in interface Assembler
Parameters:
module - the Module to assemble
Throws:
AssemblyException - thrown if the assembler tries to do something illegal

shutdown

public void shutdown()
Closing any Reporter that has been started.