Class FileOverwriterOutputWriter

java.lang.Object
org.jmxtrans.agent.AbstractOutputWriter
org.jmxtrans.agent.FileOverwriterOutputWriter
All Implemented Interfaces:
OutputWriter

public class FileOverwriterOutputWriter
extends AbstractOutputWriter
Author:
Cyrille Le Clerc
  • Field Details

    • SETTING_FILE_NAME

      public static final java.lang.String SETTING_FILE_NAME
      See Also:
      Constant Field Values
    • SETTING_FILE_NAME_DEFAULT_VALUE

      public static final java.lang.String SETTING_FILE_NAME_DEFAULT_VALUE
      See Also:
      Constant Field Values
    • SETTING_SHOW_TIMESTAMP

      public static final java.lang.String SETTING_SHOW_TIMESTAMP
      See Also:
      Constant Field Values
    • SETTING_SHOW_TIMESTAMP_DEFAULT

      public static final java.lang.Boolean SETTING_SHOW_TIMESTAMP_DEFAULT
    • temporaryFileWriter

      protected java.io.Writer temporaryFileWriter
    • temporaryFile

      protected java.io.File temporaryFile
    • file

      protected java.io.File file
    • showTimeStamp

      protected java.lang.Boolean showTimeStamp
  • Constructor Details

    • FileOverwriterOutputWriter

      public FileOverwriterOutputWriter()
  • Method Details

    • postConstruct

      public void postConstruct​(java.util.Map<java.lang.String,​java.lang.String> settings)
      Specified by:
      postConstruct in interface OutputWriter
      Overrides:
      postConstruct in class AbstractOutputWriter
    • getTemporaryFileWriter

      protected java.io.Writer getTemporaryFileWriter() throws java.io.IOException
      Throws:
      java.io.IOException
    • writeInvocationResult

      public void writeInvocationResult​(java.lang.String invocationName, java.lang.Object value) throws java.io.IOException
      Specified by:
      writeInvocationResult in interface OutputWriter
      Specified by:
      writeInvocationResult in class AbstractOutputWriter
      Throws:
      java.io.IOException
    • writeQueryResult

      public void writeQueryResult​(@Nonnull java.lang.String name, @Nullable java.lang.String type, @Nullable java.lang.Object value) throws java.io.IOException
      Specified by:
      writeQueryResult in interface OutputWriter
      Specified by:
      writeQueryResult in class AbstractOutputWriter
      type - see Query.type
      Throws:
      java.io.IOException
    • releaseTemporaryWriter

      protected void releaseTemporaryWriter()
    • postCollect

      public void postCollect() throws java.io.IOException
      Description copied from interface: OutputWriter

      called after a serie of writes, typically at the end of a collection.

      Useful with batch writers.

      Specified by:
      postCollect in interface OutputWriter
      Overrides:
      postCollect in class AbstractOutputWriter
      Throws:
      java.io.IOException