aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Context.java
diff options
context:
space:
mode:
authorIvan Martinez <ivanfmartinez@users.noreply.github.com>2018-06-01 11:20:39 -0300
committerIvan Martinez <ivanfmartinez@users.noreply.github.com>2018-06-01 11:20:39 -0300
commit575deac9e2df1cbd0601328f7ea7a9f22029fa43 (patch)
treef9a28341f7e16f02ed7609bba988b38ae6f0122d /src/org/traccar/Context.java
parent294c399e5b260313a2d49a0fed1516116a23fbd5 (diff)
downloadtrackermap-server-575deac9e2df1cbd0601328f7ea7a9f22029fa43.tar.gz
trackermap-server-575deac9e2df1cbd0601328f7ea7a9f22029fa43.tar.bz2
trackermap-server-575deac9e2df1cbd0601328f7ea7a9f22029fa43.zip
option to instantiate a new SMSNotifier using a different SMSManager
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r--src/org/traccar/Context.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java
index a7c1817cf..abf9f7a8a 100644
--- a/src/org/traccar/Context.java
+++ b/src/org/traccar/Context.java
@@ -372,6 +372,15 @@ public final class Context {
tripsConfig = initTripsConfig();
+ if (config.getBoolean("sms.smpp.enable")) {
+ 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);
+ }
+ }
+
if (config.getBoolean("event.enable")) {
initEventsModule();
}
@@ -394,15 +403,6 @@ public final class Context {
statisticsManager = new StatisticsManager();
- if (config.getBoolean("sms.smpp.enable")) {
- 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);
- }
- }
-
}
private static void initGeolocationModule() {