aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/MainModule.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-02-23 10:38:10 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-02-23 10:38:10 -0800
commitd338b1177bcc46bb1b1bad1d8a76d6008dfe2239 (patch)
treeb99a5d497656438e3807efee74655dc650d20c62 /src/org/traccar/MainModule.java
parent53256c82683b82d69d72c5535527c99566a3188c (diff)
downloadtrackermap-server-d338b1177bcc46bb1b1bad1d8a76d6008dfe2239.tar.gz
trackermap-server-d338b1177bcc46bb1b1bad1d8a76d6008dfe2239.tar.bz2
trackermap-server-d338b1177bcc46bb1b1bad1d8a76d6008dfe2239.zip
Update web handler injection
Diffstat (limited to 'src/org/traccar/MainModule.java')
-rw-r--r--src/org/traccar/MainModule.java19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/org/traccar/MainModule.java b/src/org/traccar/MainModule.java
index 6c66a90b8..19cad5237 100644
--- a/src/org/traccar/MainModule.java
+++ b/src/org/traccar/MainModule.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 Anton Tananaev (anton@traccar.org)
+ * Copyright 2018 - 2019 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@ package org.traccar;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.inject.AbstractModule;
import com.google.inject.Provides;
-import com.google.inject.assistedinject.FactoryModuleBuilder;
import org.traccar.database.IdentityManager;
import javax.ws.rs.client.Client;
@@ -26,23 +25,23 @@ import javax.ws.rs.client.Client;
public class MainModule extends AbstractModule {
@Provides
- public static ObjectMapper getObjectMapper() {
+ public static ObjectMapper provideObjectMapper() {
return Context.getObjectMapper();
}
@Provides
- public static IdentityManager getIdentityManager() {
- return Context.getIdentityManager();
+ public static Config provideConfig() {
+ return Context.getConfig();
}
@Provides
- public static Client getClient() {
- return Context.getClient();
+ public static IdentityManager provideIdentityManager() {
+ return Context.getIdentityManager();
}
- @Override
- protected void configure() {
- install(new FactoryModuleBuilder().build(WebDataHandler.Factory.class));
+ @Provides
+ public static Client provideClient() {
+ return Context.getClient();
}
}