All Downloads are FREE. Search and download functionalities are using the official Maven repository.

se.l4.vibe.Vibe Maven / Gradle / Ivy

There is a newer version: 0.4.0
Show newest version
package se.l4.vibe;


import se.l4.vibe.backend.VibeBackend;
import se.l4.vibe.builder.EventsBuilder;
import se.l4.vibe.builder.ProbeBuilder;
import se.l4.vibe.builder.SamplerBuilder;
import se.l4.vibe.builder.TimerBuilder;
import se.l4.vibe.event.Events;
import se.l4.vibe.probes.Probe;
import se.l4.vibe.probes.SampledProbe;
import se.l4.vibe.probes.Sampler;
import se.l4.vibe.timer.Timer;

/**
 * Main interface for statistics and events.
 * 
 * @author Andreas Holstenson
 *
 */
public interface Vibe
{
	/**
	 * Export a new probe.
	 * 
	 * @param probe
	 * @return
	 */
	 ProbeBuilder probe(Probe probe);

	/**
	 * Start creating a new time series.
	 * 
	 * @return
	 */
	 SamplerBuilder sample(SampledProbe probe);
	
	/**
	 * Create a new events instance.
	 * 
	 * @param base
	 * @return
	 */
	 EventsBuilder events(Class base);
	
	/**
	 * Start creating a new timer.
	 * 
	 * @return
	 */
	TimerBuilder timer();
	
	/**
	 * Get a {@link Probe} that has been registered at the given path.
	 * 
	 * @param path
	 * @return
	 */
	 Probe getProbe(String path);
	
	/**
	 * Get a {@link Sampler} that has been registered at the given path.
	 * 
	 * @param path
	 * @return
	 */
	 Sampler getTimeSeries(String path);
	
	/**
	 * Get a {@link Events} that has been registered at the given path.
	 * 
	 * @param path
	 * @return
	 */
	 Events getEvents(String path);
	
	/**
	 * Get a {@link Timer} that has been registered at the given path.
	 * 
	 * @param path
	 * @return
	 */
	Timer getTimer(String path);
	
	/**
	 * Create a Vibe instance for the given sub path.
	 * 
	 * @param path
	 * @return
	 */
	Vibe scope(String path);
	
	/**
	 * Register a new backend to this instance.
	 * 
	 * @param backend
	 */
	void addBackend(VibeBackend backend);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy