com.application.areca.impl.handler
Class DefaultArchiveHandler

java.lang.Object
  extended by com.application.areca.impl.handler.AbstractArchiveHandler
      extended by com.application.areca.impl.handler.DefaultArchiveHandler
All Implemented Interfaces:
ArchiveHandler, Duplicable

public class DefaultArchiveHandler
extends AbstractArchiveHandler

Default handler : handles standard files.

Author:
Olivier PETRUCCI

Areca Build ID : 7299034069467778562

Field Summary
 
Fields inherited from class com.application.areca.impl.handler.AbstractArchiveHandler
medium
 
Fields inherited from interface com.application.areca.impl.handler.ArchiveHandler
MODE_MERGE, MODE_RECOVER
 
Constructor Summary
DefaultArchiveHandler()
           
 
Method Summary
 void archiveDeleted(java.io.File archive)
          Callback after archive deletion
 boolean autonomousArchives()
          Tells whether the handler builds autonomous archives
 void close(ProcessContext context)
          Close the handler
 RecoveryFilterMap dispatchEntries(java.io.File[] archives, java.lang.String[] entriesToRecover)
          Return, for the array of entries passed as argument, the archives that will have to be recovered among the archive list passed as argument.
 Duplicable duplicate()
          Create a copy of the Duplicable
 java.io.File getContentFile(java.io.File archive)
          Ugly but no time to do better
 void init(ProcessContext context)
          Init the handler
 void recoverRawData(java.io.File[] archivesToRecover, RecoveryFilterMap filtersByArchive, short mode, ProcessContext context)
          Restore the data
 void store(FileSystemRecoveryEntry entry, java.io.InputStream in, java.io.OutputStream out, ProcessContext context)
          The outputStream is provided by the Medium itself.
 boolean supportsImageBackup()
          Tells whether the handler supports image backups or not
(some handlers are inherently incompatible with image backups)
 
Methods inherited from class com.application.areca.impl.handler.AbstractArchiveHandler
equals, getMedium, hashCode, setMedium
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultArchiveHandler

public DefaultArchiveHandler()
Method Detail

store

public void store(FileSystemRecoveryEntry entry,
                  java.io.InputStream in,
                  java.io.OutputStream out,
                  ProcessContext context)
           throws ApplicationException,
                  java.io.IOException,
                  TaskCancelledException
Description copied from interface: ArchiveHandler
The outputStream is provided by the Medium itself. The inputStream is provided by the target.
Reads the inputStream and writes the data in the outputStream, according to the handler's strategy. (standard storage mode, delta storage, ...)

Throws:
ApplicationException
java.io.IOException
TaskCancelledException

recoverRawData

public void recoverRawData(java.io.File[] archivesToRecover,
                           RecoveryFilterMap filtersByArchive,
                           short mode,
                           ProcessContext context)
                    throws java.io.IOException,
                           ApplicationException,
                           TaskCancelledException
Description copied from interface: ArchiveHandler
Restore the data

Throws:
java.io.IOException
ApplicationException
TaskCancelledException

archiveDeleted

public void archiveDeleted(java.io.File archive)
                    throws java.io.IOException
Description copied from interface: ArchiveHandler
Callback after archive deletion

Throws:
java.io.IOException

close

public void close(ProcessContext context)
           throws java.io.IOException
Description copied from interface: ArchiveHandler
Close the handler

Throws:
java.io.IOException

init

public void init(ProcessContext context)
          throws java.io.IOException
Description copied from interface: ArchiveHandler
Init the handler

Throws:
java.io.IOException

duplicate

public Duplicable duplicate()
Description copied from interface: Duplicable
Create a copy of the Duplicable


dispatchEntries

public RecoveryFilterMap dispatchEntries(java.io.File[] archives,
                                         java.lang.String[] entriesToRecover)
                                  throws ApplicationException,
                                         java.io.IOException
Description copied from interface: ArchiveHandler
Return, for the array of entries passed as argument, the archives that will have to be recovered among the archive list passed as argument.
The returned map contains entries indexed by archive file.
entriesToRecover MUST be sorted

Throws:
ApplicationException
java.io.IOException

supportsImageBackup

public boolean supportsImageBackup()
Description copied from interface: ArchiveHandler
Tells whether the handler supports image backups or not
(some handlers are inherently incompatible with image backups)


getContentFile

public java.io.File getContentFile(java.io.File archive)
Description copied from interface: ArchiveHandler
Ugly but no time to do better


autonomousArchives

public boolean autonomousArchives()
Description copied from interface: ArchiveHandler
Tells whether the handler builds autonomous archives