Commit 8471c0d9 authored by Guillaume Surrel's avatar Guillaume Surrel
Browse files

Remove destination type parameter.

parent 11fb715e
......@@ -117,9 +117,6 @@ public class AcquisitionModule implements ReliableTransmitter {
/** The acquisition queue or topic using this module. */
private final Destination destination;
/** The destination type set in acquired messages/ */
private final byte destType;
/** The period before subsequent acquisition if positive. */
private long period = 0;
......@@ -132,13 +129,12 @@ public class AcquisitionModule implements ReliableTransmitter {
*/
private boolean isDaemon = false;
public AcquisitionModule(Destination destination, String className, Properties properties, byte destType) {
public AcquisitionModule(Destination destination, String className, Properties properties) {
if (logger.isLoggable(BasicLevel.DEBUG)) {
logger.log(BasicLevel.DEBUG, "AcquisitionModule.<init> prop = " + properties);
}
this.destination = destination;
this.destType = destType;
try {
Class clazz = Class.forName(className);
......@@ -349,7 +345,7 @@ public class AcquisitionModule implements ReliableTransmitter {
message.id = "ID:" + destination.getDestinationId() + '_' + msgCount;
message.timestamp = currentTime;
message.persistent = isPersistent;
message.setDestination(destination.getId().toString(), destType);
message.setDestination(destination.getId().toString(), destination.getType());
message.priority = priority;
if (expiration > 0) {
message.expiration = currentTime + expiration;
......
......@@ -26,7 +26,6 @@ import java.util.Properties;
import org.objectweb.joram.mom.notifications.ClientMessages;
import org.objectweb.joram.shared.excepts.RequestException;
import org.objectweb.joram.shared.messages.Message;
import org.objectweb.util.monolog.api.BasicLevel;
import org.objectweb.util.monolog.api.Logger;
......@@ -100,7 +99,7 @@ public class AcquisitionQueue extends Queue implements AcquisitionQueueMBean {
public void initialize(boolean firstTime) {
super.initialize(firstTime);
if (acquisitionModule == null) {
acquisitionModule = new AcquisitionModule(this, acquisitionClassName, properties, Message.QUEUE_TYPE);
acquisitionModule = new AcquisitionModule(this, acquisitionClassName, properties);
}
}
......
......@@ -26,7 +26,6 @@ import java.util.Properties;
import org.objectweb.joram.mom.notifications.ClientMessages;
import org.objectweb.joram.shared.excepts.RequestException;
import org.objectweb.joram.shared.messages.Message;
import org.objectweb.util.monolog.api.BasicLevel;
import org.objectweb.util.monolog.api.Logger;
......@@ -100,7 +99,7 @@ public class AcquisitionTopic extends Topic implements AcquisitionTopicMBean {
public void initialize(boolean firstTime) {
super.initialize(firstTime);
if (acquisitionModule == null) {
acquisitionModule = new AcquisitionModule(this, acquisitionClassName, properties, Message.TOPIC_TYPE);
acquisitionModule = new AcquisitionModule(this, acquisitionClassName, properties);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment