Package org.jmxtrans.embedded.output
Interface OutputWriter
- All Known Implementing Classes:
AbstractOutputWriter,ConsoleWriter,CopperEggWriter,CsvWriter,GraphiteHttpWriter,GraphitePickleWriter,GraphiteWriter,LibratoWriter,NoOpWriter,Slf4jWriter,StackdriverWriter,StatsDWriter
public interface OutputWriter
Interface of define a writer that will convert the collected JMX metrics to a given format (e.g. file, Graphite, ...)
- Author:
- Cyrille Le Clerc, Jon Stevens
-
Method Summary
Modifier and Type Method Description Map<String,Object>getSettings()Configuration settings of the OutputWriter.booleanisEnabled()voidsetEnabled(boolean enabled)voidsetSettings(Map<String,Object> settings)Sets the configuration setting of the OutputWriter.voidstart()Initialize the OutputWriter.voidstop()Stops the underlying resources of the OutputWriter.voidwrite(Iterable<QueryResult> results)Write all the given QueryResult to the target system.
-
Method Details
-
getSettings
Configuration settings of the OutputWriter. -
setSettings
Sets the configuration setting of the OutputWriter. -
write
Write all the given QueryResult to the target system. -
start
Initialize the OutputWriter. Called at the startup of the EmbeddedJmxTrans. This is the place to load the configuration (from the injected settings) and to initialize writer's resource like object pools. Writer are started even ifisEnabled()isfalse.- Throws:
Exception
-
stop
Stops the underlying resources of the OutputWriter. Called at the shutdown of the EmbeddedJmxTrans. This is the place to stop the writer's resources like object pools, threads and sockets.- Throws:
Exception
-
isEnabled
boolean isEnabled() -
setEnabled
void setEnabled(boolean enabled)
-