diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-03-09 17:09:13 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-03-09 17:09:13 -0800 |
commit | 312f5d2a3af3ec53cc6ff73cd3424d68a2774dcd (patch) | |
tree | e87286756e9a58144085815b70a226be755f3dbd /src/org/traccar/MainModule.java | |
parent | 5c084a0b2961dbfc3cd85a386fefe0b0da6c0c44 (diff) | |
download | trackermap-server-312f5d2a3af3ec53cc6ff73cd3424d68a2774dcd.tar.gz trackermap-server-312f5d2a3af3ec53cc6ff73cd3424d68a2774dcd.tar.bz2 trackermap-server-312f5d2a3af3ec53cc6ff73cd3424d68a2774dcd.zip |
Refactor default data handler
Diffstat (limited to 'src/org/traccar/MainModule.java')
-rw-r--r-- | src/org/traccar/MainModule.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/org/traccar/MainModule.java b/src/org/traccar/MainModule.java index 8ad89529f..16a78b109 100644 --- a/src/org/traccar/MainModule.java +++ b/src/org/traccar/MainModule.java @@ -49,6 +49,7 @@ import org.traccar.geolocation.OpenCellIdGeolocationProvider; import org.traccar.geolocation.UnwiredGeolocationProvider; import org.traccar.handler.ComputedAttributesHandler; import org.traccar.handler.CopyAttributesHandler; +import org.traccar.handler.DefaultDataHandler; import org.traccar.handler.DistanceHandler; import org.traccar.handler.EngineHoursHandler; import org.traccar.handler.FilterHandler; @@ -291,6 +292,15 @@ public class MainModule extends AbstractModule { @Singleton @Provides + public static DefaultDataHandler provideDefaultDataHandler(@Nullable DataManager dataManager) { + if (dataManager != null) { + return new DefaultDataHandler(dataManager); + } + return null; + } + + @Singleton + @Provides public static CommandResultEventHandler provideCommandResultEventHandler() { return new CommandResultEventHandler(); } |