Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Commit

Permalink
Move configuration objects into a separated package for better projec…
Browse files Browse the repository at this point in the history
…t organizing.
  • Loading branch information
lsolova committed Apr 17, 2011
1 parent 878a4e9 commit 1f7dcf6
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/main/java/org/masukomi/aspirin/core/Aspirin.java
Expand Up @@ -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;
Expand Down Expand Up @@ -82,7 +83,7 @@ public class Aspirin {
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. */
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/masukomi/aspirin/core/QueManager.java
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/masukomi/aspirin/core/RemoteDelivery.java
Expand Up @@ -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;

/**
Expand Down
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
/**
Expand Down
@@ -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
Expand Down
@@ -1,4 +1,4 @@
package org.masukomi.aspirin.core;
package org.masukomi.aspirin.core.config;

import javax.mail.Transport;

Expand Down
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/test/java/org/masukomi/aspirin/core/MailQueTest.java
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion www/configuration.html
Expand Up @@ -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>
Expand Down

0 comments on commit 1f7dcf6

Please sign in to comment.