this.mediaDir = mediaDir;
this.mailNotification = mailNotification;
this.fileConverters = fileConverters;
noWorkDelayInMs = DELAY_NO_WORK_POLLING;
CouchDbChangeMonitor changeMonitor = documentDbDesign.getDatabase().getChangeMonitor();
if( null != changeMonitor ){
changeMonitor.addChangeListener(this);
noWorkDelayInMs = DELAY_NO_WORK_MONITOR;
}
if( null != submissionDbDesign ){
changeMonitor = submissionDbDesign.getDatabase().getChangeMonitor();
if( null != changeMonitor ){
changeMonitor.addChangeListener(this);
}
}
}