aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/MictrackProtocol.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol/MictrackProtocol.java')
-rw-r--r--src/main/java/org/traccar/protocol/MictrackProtocol.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main/java/org/traccar/protocol/MictrackProtocol.java b/src/main/java/org/traccar/protocol/MictrackProtocol.java
index 9fd9666e4..ccbc4db4c 100644
--- a/src/main/java/org/traccar/protocol/MictrackProtocol.java
+++ b/src/main/java/org/traccar/protocol/MictrackProtocol.java
@@ -20,21 +20,25 @@ import io.netty.handler.codec.string.StringEncoder;
import org.traccar.BaseProtocol;
import org.traccar.PipelineBuilder;
import org.traccar.TrackerServer;
+import org.traccar.config.Config;
+
+import javax.inject.Inject;
public class MictrackProtocol extends BaseProtocol {
- public MictrackProtocol() {
- addServer(new TrackerServer(false, getName()) {
+ @Inject
+ public MictrackProtocol(Config config) {
+ addServer(new TrackerServer(config, getName(), false) {
@Override
- protected void addProtocolHandlers(PipelineBuilder pipeline) {
+ protected void addProtocolHandlers(PipelineBuilder pipeline, Config config) {
pipeline.addLast(new StringEncoder());
pipeline.addLast(new StringDecoder());
pipeline.addLast(new MictrackProtocolDecoder(MictrackProtocol.this));
}
});
- addServer(new TrackerServer(true, getName()) {
+ addServer(new TrackerServer(config, getName(), true) {
@Override
- protected void addProtocolHandlers(PipelineBuilder pipeline) {
+ protected void addProtocolHandlers(PipelineBuilder pipeline, Config config) {
pipeline.addLast(new StringEncoder());
pipeline.addLast(new StringDecoder());
pipeline.addLast(new MictrackProtocolDecoder(MictrackProtocol.this));