eXo JCR :: Component :: Extension Service 1.16.0-CR2

org.exoplatform.services.jcr.ext.backup.impl
Class AbstractBackupJob

java.lang.Object
  extended by org.exoplatform.services.jcr.ext.backup.impl.AbstractBackupJob
All Implemented Interfaces:
Runnable, BackupJob
Direct Known Subclasses:
AbstractFullBackupJob, AbstractIncrementalBackupJob

public abstract class AbstractBackupJob
extends Object
implements BackupJob

Created by The eXo Platform SAS Date: 05.02.2008

Version:
$Id: AbstrackBackupJob.java 760 2008-02-07 15:08:07Z pnedonosko $
Author:
Peter Nedonosko

Field Summary
protected  BackupConfig config
           
protected  int id
           
protected  ManageableRepository repository
           
protected  int state
           
protected  Calendar timeStamp
           
protected  URL url
           
protected  String workspaceName
           
 
Fields inherited from interface org.exoplatform.services.jcr.ext.backup.BackupJob
FINISHED, FULL, INCREMENTAL, STARTING, WAITING, WORKING
 
Constructor Summary
AbstractBackupJob()
           
 
Method Summary
 void addListener(BackupJobListener listener)
          Adding listener.
protected abstract  URL createStorage()
          This method is called by run() and resume() Backup implementation knows how to create new storage
 int getId()
          Getting the id of job.
 int getState()
          Getting state of job.
 URL getStorageURL()
          Getting storage URL.
protected  void notifyError(String message, Throwable error)
          Notify all listeners about an error
protected  void notifyListeners()
          Notify all listeners about the job state changed
 void removeListener(BackupJobListener listener)
          Remove listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.exoplatform.services.jcr.ext.backup.BackupJob
getType, init, stop
 
Methods inherited from interface java.lang.Runnable
run
 

Field Detail

state

protected volatile int state

id

protected int id

config

protected BackupConfig config

repository

protected ManageableRepository repository

workspaceName

protected String workspaceName

timeStamp

protected Calendar timeStamp

url

protected URL url
Constructor Detail

AbstractBackupJob

public AbstractBackupJob()
Method Detail

createStorage

protected abstract URL createStorage()
                              throws FileNotFoundException,
                                     IOException
This method is called by run() and resume() Backup implementation knows how to create new storage

Returns:
URL of new storage
Throws:
FileNotFoundException
IOException

getStorageURL

public final URL getStorageURL()
Description copied from interface: BackupJob
Getting storage URL.

Specified by:
getStorageURL in interface BackupJob
Returns:
URL return the storage URL
See Also:
BackupJob.getStorageURL()

getState

public final int getState()
Description copied from interface: BackupJob
Getting state of job.

Specified by:
getState in interface BackupJob
Returns:
int return the state of job

getId

public final int getId()
Description copied from interface: BackupJob
Getting the id of job.

Specified by:
getId in interface BackupJob
Returns:
int return id

addListener

public void addListener(BackupJobListener listener)
Description copied from interface: BackupJob
Adding listener.

Specified by:
addListener in interface BackupJob
Parameters:
listener - BackupJobListener, the job listener

removeListener

public void removeListener(BackupJobListener listener)
Description copied from interface: BackupJob
Remove listener.

Specified by:
removeListener in interface BackupJob
Parameters:
listener - BackupJobListener, the job listener

notifyListeners

protected void notifyListeners()
Notify all listeners about the job state changed


notifyError

protected void notifyError(String message,
                           Throwable error)
Notify all listeners about an error

Parameters:
error - - Throwable instance

eXo JCR :: Component :: Extension Service 1.16.0-CR2

Copyright © 2014 eXo Platform SAS. All Rights Reserved.