Class OptimizationSession

java.lang.Object
com.itextpdf.pdfoptimizer.OptimizationSession

public class OptimizationSession extends Object
Class is used to handle auxiliary activities during the optimization processing (i. e. generating optimization report).
  • Field Details

  • Constructor Details

    • OptimizationSession

      public OptimizationSession (DefaultReportBuilder reportBuilder)
      Creates an instance of OptimizationSession with provided DefaultReportBuilder.
      Parameters:
      reportBuilder - is a report builder
  • Method Details

    • registerEvent

      public void registerEvent (SeverityLevel level, String message, Object... args)
      Registers an event of optimization process.
      Parameters:
      level - is a severity level of the event
      message - is a text message of the event
      args - are arguments of the message if it is parametrized
    • getStoredValue

      public Object getStoredValue (String key)
      Retrieves stored value associated with the provided key.
      Parameters:
      key - is a key to access the value
      Returns:
      the value associated with the key
    • storeValue

      public void storeValue (String key, Object value)
      Puts a value and a key associated with it into internal storage.
      Parameters:
      key - is a key to access the value
      value - is a value associated with the key