1 6 7 package com.sun.enterprise.config.backup; 8 9 import com.sun.enterprise.config.backup.utils.LoggerHelper; 10 import java.util.logging.Logger ; 11 import com.sun.enterprise.config.backup.status.StatusConstants; 12 import com.sun.enterprise.config.backup.BackupStorageMonitor; 13 import com.sun.enterprise.config.backup.HistoryManager; 14 15 import com.sun.enterprise.config.backup.EnvironmentConstants; 16 17 18 28 public class FeatureFactory implements StatusConstants, EnvironmentConstants { 29 30 private static HistoryManager _HM = null; 31 private static BackupStorageMonitor _MBM = null; 32 private static SnapShotStorageMonitor _MSM = null; 33 34 public static synchronized HistoryManager getHistoryManager() 35 throws BackupException { 36 if(_HM == null) 37 _HM = createHistoryManager(); 38 39 return _HM; 40 } 41 private static HistoryManager createHistoryManager() 42 throws BackupException { 43 return new HistoryManager(); 44 } 45 46 public static synchronized BackupStorageMonitor getBackupStorageMonitor() 47 throws BackupException { 48 49 if(_MBM == null) 50 _MBM = createBackupStorageMonitor(); 51 52 return _MBM; 53 } 54 55 private static BackupStorageMonitor createBackupStorageMonitor() 56 throws BackupException { 57 return new BackupStorageMonitor(); 58 } 59 60 public static synchronized SnapShotStorageMonitor getSnapShotStorageMonitor() 61 throws BackupException { 62 63 if(_MSM == null) 64 _MSM = createSnapShotStorageMonitor(); 65 66 return _MSM; 67 } 68 69 private static SnapShotStorageMonitor createSnapShotStorageMonitor() 70 throws BackupException { 71 return new SnapShotStorageMonitor(); 72 } 73 74 84 85 90 } | Popular Tags |