aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Context.java
diff options
context:
space:
mode:
authorIvan Martinez <ivanfmartinez@users.noreply.github.com>2018-03-25 22:16:09 -0300
committerIvan Martinez <ivanfmartinez@users.noreply.github.com>2018-04-01 09:55:46 -0300
commit5a62fe3d56e12f8cc84e7a64d72a4d2e8e09572f (patch)
treee99c99e910442ca15ae4c2d89f4f28ff36418bbb /src/org/traccar/Context.java
parent0117dfeef0a7ffbc7a47d9681811177136336730 (diff)
downloadtrackermap-server-5a62fe3d56e12f8cc84e7a64d72a4d2e8e09572f.tar.gz
trackermap-server-5a62fe3d56e12f8cc84e7a64d72a4d2e8e09572f.tar.bz2
trackermap-server-5a62fe3d56e12f8cc84e7a64d72a4d2e8e09572f.zip
generalization for notifications processing
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r--src/org/traccar/Context.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java
index 09e3c619b..c9ac4ec12 100644
--- a/src/org/traccar/Context.java
+++ b/src/org/traccar/Context.java
@@ -74,7 +74,7 @@ import org.traccar.notification.EventForwarder;
import org.traccar.notification.JsonTypeEventForwarder;
import org.traccar.notification.MultiPartEventForwarder;
import org.traccar.reports.model.TripsConfig;
-import org.traccar.smpp.SmppClient;
+import org.traccar.sms.SMSManager;
import org.traccar.web.WebServer;
public final class Context {
@@ -238,10 +238,10 @@ public final class Context {
return statisticsManager;
}
- private static SmppClient smppClient;
+ private static SMSManager smsManager;
- public static SmppClient getSmppManager() {
- return smppClient;
+ public static SMSManager getSmsManager() {
+ return smsManager;
}
private static MotionEventHandler motionEventHandler;
@@ -388,7 +388,12 @@ public final class Context {
statisticsManager = new StatisticsManager();
if (config.getBoolean("sms.smpp.enable")) {
- smppClient = new SmppClient();
+ final String smsManagerClass = config.getString("sms.manager.class", "org.traccar.smpp.SmppClient");
+ try {
+ smsManager = (SMSManager) Class.forName(smsManagerClass).newInstance();
+ } catch (ClassNotFoundException e) {
+ Log.warning("Error loading SMS Manager class : " + smsManagerClass, e);
+ }
}
}