aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/RuptelaProtocol.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol/RuptelaProtocol.java')
-rw-r--r--src/main/java/org/traccar/protocol/RuptelaProtocol.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/RuptelaProtocol.java b/src/main/java/org/traccar/protocol/RuptelaProtocol.java
index 5d1f86553..99a9686f6 100644
--- a/src/main/java/org/traccar/protocol/RuptelaProtocol.java
+++ b/src/main/java/org/traccar/protocol/RuptelaProtocol.java
@@ -19,11 +19,15 @@ import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
import org.traccar.BaseProtocol;
import org.traccar.PipelineBuilder;
import org.traccar.TrackerServer;
+import org.traccar.config.Config;
import org.traccar.model.Command;
+import javax.inject.Inject;
+
public class RuptelaProtocol extends BaseProtocol {
- public RuptelaProtocol() {
+ @Inject
+ public RuptelaProtocol(Config config) {
setSupportedDataCommands(
Command.TYPE_CUSTOM,
Command.TYPE_ENGINE_STOP,
@@ -35,9 +39,9 @@ public class RuptelaProtocol extends BaseProtocol {
Command.TYPE_OUTPUT_CONTROL,
Command.TYPE_SET_CONNECTION,
Command.TYPE_SET_ODOMETER);
- addServer(new TrackerServer(false, getName()) {
+ addServer(new TrackerServer(config, getName(), false) {
@Override
- protected void addProtocolHandlers(PipelineBuilder pipeline) {
+ protected void addProtocolHandlers(PipelineBuilder pipeline, Config config) {
pipeline.addLast(new LengthFieldBasedFrameDecoder(1024, 0, 2, 2, 0));
pipeline.addLast(new RuptelaProtocolEncoder(RuptelaProtocol.this));
pipeline.addLast(new RuptelaProtocolDecoder(RuptelaProtocol.this));