aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/MainModule.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/MainModule.java')
-rw-r--r--src/org/traccar/MainModule.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/org/traccar/MainModule.java b/src/org/traccar/MainModule.java
index cfd280c9f..fe280d7a3 100644
--- a/src/org/traccar/MainModule.java
+++ b/src/org/traccar/MainModule.java
@@ -23,6 +23,8 @@ import org.traccar.config.Config;
import org.traccar.config.Keys;
import org.traccar.database.AttributesManager;
import org.traccar.database.DataManager;
+import org.traccar.database.DeviceManager;
+import org.traccar.database.GeofenceManager;
import org.traccar.database.IdentityManager;
import org.traccar.database.StatisticsManager;
import org.traccar.geocoder.AddressFormat;
@@ -55,6 +57,7 @@ import org.traccar.handler.HemisphereHandler;
import org.traccar.handler.MotionHandler;
import org.traccar.handler.RemoteAddressHandler;
import org.traccar.handler.events.CommandResultEventHandler;
+import org.traccar.handler.events.OverspeedEventHandler;
import org.traccar.reports.model.TripsConfig;
import javax.annotation.Nullable;
@@ -93,6 +96,16 @@ public class MainModule extends AbstractModule {
}
@Provides
+ public static DeviceManager provideDeviceManager() {
+ return Context.getDeviceManager();
+ }
+
+ @Provides
+ public static GeofenceManager provideGeofenceManager() {
+ return Context.getGeofenceManager();
+ }
+
+ @Provides
public static AttributesManager provideAttributesManager() {
return Context.getAttributesManager();
}
@@ -271,6 +284,13 @@ public class MainModule extends AbstractModule {
return new CommandResultEventHandler();
}
+ @Singleton
+ @Provides
+ public static OverspeedEventHandler provideOverspeedEventHandler(
+ Config config, DeviceManager deviceManager, GeofenceManager geofenceManager) {
+ return new OverspeedEventHandler(config, deviceManager, geofenceManager);
+ }
+
@Override
protected void configure() {
binder().requireExplicitBindings();