Class AbstractCompressAction

java.lang.Object
org.apache.logging.log4j.core.appender.rolling.action.AbstractAction
org.apache.logging.log4j.core.appender.rolling.action.AbstractCompressAction
All Implemented Interfaces:
Runnable, Action

public abstract class AbstractCompressAction extends AbstractAction
  • Field Details

  • Constructor Details

    • AbstractCompressAction

      public AbstractCompressAction(Path source, Path destination)
  • Method Details

    • getAlgorithmName

      protected abstract String getAlgorithmName()
      The name of this compression algorithm.

      When applicable, it should correspond to the name used by Apache Commons Compress.

    • wrapOutputStream

      protected abstract OutputStream wrapOutputStream(OutputStream stream) throws IOException
      Wraps an output stream into a compressing output stream.
      Parameters:
      stream - The stream to wrap.
      Returns:
      A compressing output stream.
      Throws:
      IOException
    • execute

      public boolean execute() throws IOException
      Description copied from class: AbstractAction
      Performs action.
      Specified by:
      execute in interface Action
      Specified by:
      execute in class AbstractAction
      Returns:
      true if successful.
      Throws:
      IOException - if IO error.
    • reportException

      protected void reportException(Exception ex)
      Capture exception.
      Overrides:
      reportException in class AbstractAction
      Parameters:
      ex - exception.
    • toString

      public String toString()
      Overrides:
      toString in class Object