Permalink
Browse files

Move configuration objects into a separated package for better projec…

…t organizing.
  • Loading branch information...
lsolova committed Apr 17, 2011
1 parent 878a4e9 commit 1f7dcf6c04f3266ce17b0c9b46a77885a1764681
@@ -13,6 +13,7 @@
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMessage.RecipientType;
+import org.masukomi.aspirin.core.config.Configuration;
import org.masukomi.aspirin.core.delivery.DeliveryManager;
import org.masukomi.aspirin.core.listener.ListenerManager;
import org.masukomi.aspirin.core.store.mail.FileMailStore;
@@ -82,7 +83,7 @@
private static Integer idCounter = 0;
/** Configuration object of Aspirin. */
- private static Configuration configuration = new Configuration();
+ private static Configuration configuration = Configuration.getInstance();
/** AspirinListener management object. Create on first request. */
private static ListenerManager listenerManager = null;
/** Delivery and QoS service management. Create on first request. */
@@ -27,6 +27,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.pool.ObjectPool;
import org.apache.commons.pool.impl.GenericObjectPool;
+import org.masukomi.aspirin.core.config.ConfigurationChangeListener;
+import org.masukomi.aspirin.core.config.ConfigurationMBean;
/**
* <p>This object is the manager, the main class of mail delivering.</p>
@@ -84,6 +84,8 @@
import org.apache.james.core.MailImpl;
import org.apache.mailet.Mail;
import org.apache.mailet.MailAddress;
+import org.masukomi.aspirin.core.config.ConfigurationChangeListener;
+import org.masukomi.aspirin.core.config.ConfigurationMBean;
import org.masukomi.aspirin.core.dns.DnsResolver;
/**
@@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-package org.masukomi.aspirin.core;
+package org.masukomi.aspirin.core.config;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
@@ -402,7 +402,7 @@ public void setDeliveryThreads(int threadCount) {
/**
* @return The email address of the postmaster in a MailAddress object.
*/
- MailAddress getPostmaster() {
+ public MailAddress getPostmaster() {
return postmaster;
}
/**
@@ -1,4 +1,4 @@
-package org.masukomi.aspirin.core;
+package org.masukomi.aspirin.core.config;
/**
* <p>This interface is part of configuration subsystem. If a configuration
@@ -1,4 +1,4 @@
-package org.masukomi.aspirin.core;
+package org.masukomi.aspirin.core.config;
import javax.mail.Transport;
@@ -13,6 +13,7 @@
import javax.management.MBeanServer;
import javax.management.ObjectName;
+import org.masukomi.aspirin.core.config.Configuration;
import org.masukomi.aspirin.core.store.mail.FileMailStore;
import junit.framework.TestCase;
@@ -16,6 +16,7 @@
import junit.framework.TestCase;
import org.jvnet.mock_javamail.Mailbox;
+import org.masukomi.aspirin.core.config.Configuration;
/**
* @author masukomi masukomi at masukomi dot org
* @author Sandeep Mukherjee (msandeep at technologist dot com ) who wrote the mail checking routines in his PopKorn
View
@@ -25,7 +25,7 @@
<li>aspirinMaxAttempts - the maximum number of times it will try and send a message if it has problems.</li>
</ul>
<p><b>Configuring via setter methods</b><br />
- See the Javadocs in <tt>org.masukomi.aspirin.core.Configuration</tt>for details on this method. </p>
+ See the Javadocs in <tt>org.masukomi.aspirin.core.config.Configuration</tt>for details on this method. </p>
<p><b>Configuring via doing nothing</b><br />
See above for the default settings. </p>
<p><b>Configuring Aspirin's Logging</span><br>

0 comments on commit 1f7dcf6

Please sign in to comment.