1 31 32 package org.opencms.monitor; 33 34 import java.util.ArrayList ; 35 import java.util.Collections ; 36 import java.util.List ; 37 38 47 public class CmsMemoryMonitorConfiguration { 48 49 50 private int m_emailInterval; 51 52 53 private List m_emailReceiver; 54 55 56 private String m_emailSender; 57 58 59 private int m_logInterval; 60 61 62 private int m_maxUsagePercent; 63 64 65 private int m_warningInterval; 66 67 70 public CmsMemoryMonitorConfiguration() { 71 72 m_emailReceiver = new ArrayList (); 73 } 74 75 80 public void addEmailReceiver(String emailReceiver) { 81 82 m_emailReceiver.add(emailReceiver); 83 } 84 85 90 public int getEmailInterval() { 91 92 return m_emailInterval; 93 } 94 95 100 public List getEmailReceiver() { 101 102 Collections.sort(m_emailReceiver); 103 return m_emailReceiver; 104 } 105 106 111 public String getEmailSender() { 112 113 return m_emailSender; 114 } 115 116 121 public int getLogInterval() { 122 123 return m_logInterval; 124 } 125 126 131 public int getMaxUsagePercent() { 132 133 return m_maxUsagePercent; 134 } 135 136 141 public int getWarningInterval() { 142 143 return m_warningInterval; 144 } 145 146 154 public void initialize(String maxUsagePercent, String logInterval, String emailInterval, String warningInterval) { 155 156 m_maxUsagePercent = Integer.parseInt(maxUsagePercent); 157 m_logInterval = Integer.parseInt(logInterval); 158 m_emailInterval = Integer.parseInt(emailInterval); 159 m_warningInterval = Integer.parseInt(warningInterval); 160 } 161 162 167 public void setEmailSender(String emailSender) { 168 169 m_emailSender = emailSender; 170 } 171 } 172 | Popular Tags |