Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move configuration objects into a separated package for better projec…

…t organizing.
  • Loading branch information...
commit 1f7dcf6c04f3266ce17b0c9b46a77885a1764681 1 parent 878a4e9
@lsolova lsolova authored
View
3  src/main/java/org/masukomi/aspirin/core/Aspirin.java
@@ -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. */
View
2  src/main/java/org/masukomi/aspirin/core/QueManager.java
@@ -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>
View
2  src/main/java/org/masukomi/aspirin/core/RemoteDelivery.java
@@ -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;
/**
View
4 ...java/org/masukomi/aspirin/core/Configuration.java → ...g/masukomi/aspirin/core/config/Configuration.java
@@ -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;
}
/**
View
2  ...omi/aspirin/core/ConfigurationChangeListener.java → ...irin/core/config/ConfigurationChangeListener.java
@@ -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
View
2  ...org/masukomi/aspirin/core/ConfigurationMBean.java → ...ukomi/aspirin/core/config/ConfigurationMBean.java
@@ -1,4 +1,4 @@
-package org.masukomi.aspirin.core;
+package org.masukomi.aspirin.core.config;
import javax.mail.Transport;
View
1  src/test/java/org/masukomi/aspirin/core/DefunctModuleTest.java
@@ -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;
View
1  src/test/java/org/masukomi/aspirin/core/MailQueTest.java
@@ -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
2  www/configuration.html
@@ -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>
Please sign in to comment.
Something went wrong with that request. Please try again.