aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/MainModule.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-02-23 12:12:31 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-02-23 12:12:31 -0800
commit7e239583698a169971f5bd817adbabdacba8dc56 (patch)
tree0914e1641733961352401b7d629542f23b8d6fb3 /src/org/traccar/MainModule.java
parentbd909426d24832e42a63503c338bbd8c37176caa (diff)
downloadtrackermap-server-7e239583698a169971f5bd817adbabdacba8dc56.tar.gz
trackermap-server-7e239583698a169971f5bd817adbabdacba8dc56.tar.bz2
trackermap-server-7e239583698a169971f5bd817adbabdacba8dc56.zip
Update filter handler
Diffstat (limited to 'src/org/traccar/MainModule.java')
-rw-r--r--src/org/traccar/MainModule.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/org/traccar/MainModule.java b/src/org/traccar/MainModule.java
index 26bdfcd60..60f774544 100644
--- a/src/org/traccar/MainModule.java
+++ b/src/org/traccar/MainModule.java
@@ -22,6 +22,7 @@ import com.google.inject.Singleton;
import org.traccar.config.Config;
import org.traccar.config.Keys;
import org.traccar.database.IdentityManager;
+import org.traccar.processing.FilterHandler;
import javax.ws.rs.client.Client;
@@ -49,6 +50,16 @@ public class MainModule extends AbstractModule {
@Singleton
@Provides
+ public static FilterHandler provideFilterHandler(Config config) {
+ if (config.getBoolean(Keys.FILTER_ENABLE)) {
+ return new FilterHandler(config);
+ } else {
+ return null;
+ }
+ }
+
+ @Singleton
+ @Provides
public static WebDataHandler provideWebDataHandler(
Config config, IdentityManager identityManager, ObjectMapper objectMapper, Client client) {
if (config.getBoolean(Keys.FORWARD_ENABLE)) {