public abstract class AbstractBackupJob extends Object implements BackupJob
| Modifier and Type | Field and Description |
|---|---|
protected BackupConfig |
config |
protected int |
id |
protected ManageableRepository |
repository |
protected int |
state |
protected Calendar |
timeStamp |
protected URL |
url |
protected String |
workspaceName |
| Constructor and Description |
|---|
AbstractBackupJob() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected volatile int state
protected int id
protected BackupConfig config
protected ManageableRepository repository
protected String workspaceName
protected Calendar timeStamp
protected URL url
protected abstract URL createStorage() throws FileNotFoundException, IOException
FileNotFoundExceptionIOExceptionpublic final URL getStorageURL()
BackupJobgetStorageURL in interface BackupJobBackupJob.getStorageURL()public final int getState()
BackupJobpublic final int getId()
BackupJobpublic void addListener(BackupJobListener listener)
BackupJobaddListener in interface BackupJoblistener - BackupJobListener, the job listenerpublic void removeListener(BackupJobListener listener)
BackupJobremoveListener in interface BackupJoblistener - BackupJobListener, the job listenerprotected void notifyListeners()
Copyright © 2020 eXo Platform SAS. All Rights Reserved.