org.opends.server.loggers
Class EncryptAction

java.lang.Object
  extended by org.opends.server.loggers.EncryptAction
All Implemented Interfaces:
PostRotationAction

public class EncryptAction
extends java.lang.Object
implements PostRotationAction

This class implements a post rotation action that encrypts the log file.


Constructor Summary
EncryptAction(java.lang.String origFile, java.lang.String newFile, boolean deleteOriginal, java.lang.String alias, java.lang.String encryptAlg)
          Create the action based on the original file, the new file after encrypting and whether the original file should be deleted.
 
Method Summary
 boolean execute()
          The signature action that is executed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncryptAction

public EncryptAction(java.lang.String origFile,
                     java.lang.String newFile,
                     boolean deleteOriginal,
                     java.lang.String alias,
                     java.lang.String encryptAlg)
Create the action based on the original file, the new file after encrypting and whether the original file should be deleted.

Parameters:
origFile - The source file to be encrypted.
newFile - The new file to which the encrypted data should be written.
deleteOriginal - Indicates whether the original file should be deleted.
alias - The nickname of the certificate to use for the encryption.
encryptAlg - The encryption algorithm that should be used.
Method Detail

execute

public boolean execute()
The signature action that is executed. Returns true if the encryption succeeded and false otherwise.

Specified by:
execute in interface PostRotationAction
Returns:
true if the encryption succeeded, or false if it did not.