aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-03-15 15:03:43 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-03-15 15:03:43 -0700
commitc43208bf5339244cd9a47348ec9daa1805099718 (patch)
treeff5a8df095223f4b8a1dfe63c44bb349c7f9c1c7 /src/main/java/org
parent57c977d8369c96787c778ac2c27769ec53f24a6e (diff)
downloadtraccar-server-c43208bf5339244cd9a47348ec9daa1805099718.tar.gz
traccar-server-c43208bf5339244cd9a47348ec9daa1805099718.tar.bz2
traccar-server-c43208bf5339244cd9a47348ec9daa1805099718.zip
Remove extra method
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/BaseProtocol.java7
-rw-r--r--src/main/java/org/traccar/protocol/WondexProtocol.java11
2 files changed, 10 insertions, 8 deletions
diff --git a/src/main/java/org/traccar/BaseProtocol.java b/src/main/java/org/traccar/BaseProtocol.java
index c0fd1e27f..6d459f7d4 100644
--- a/src/main/java/org/traccar/BaseProtocol.java
+++ b/src/main/java/org/traccar/BaseProtocol.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 - 2018 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2020 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.
@@ -68,11 +68,6 @@ public abstract class BaseProtocol implements Protocol {
supportedTextCommands.addAll(Arrays.asList(commands));
}
- public void setSupportedCommands(String... commands) {
- supportedDataCommands.addAll(Arrays.asList(commands));
- supportedTextCommands.addAll(Arrays.asList(commands));
- }
-
@Override
public Collection<String> getSupportedDataCommands() {
Set<String> commands = new HashSet<>(supportedDataCommands);
diff --git a/src/main/java/org/traccar/protocol/WondexProtocol.java b/src/main/java/org/traccar/protocol/WondexProtocol.java
index 035dd9160..6401fde85 100644
--- a/src/main/java/org/traccar/protocol/WondexProtocol.java
+++ b/src/main/java/org/traccar/protocol/WondexProtocol.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 - 2019 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2020 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.
@@ -25,7 +25,7 @@ import io.netty.handler.codec.string.StringEncoder;
public class WondexProtocol extends BaseProtocol {
public WondexProtocol() {
- setSupportedCommands(
+ setSupportedDataCommands(
Command.TYPE_GET_DEVICE_STATUS,
Command.TYPE_GET_MODEM_STATUS,
Command.TYPE_REBOOT_DEVICE,
@@ -33,6 +33,13 @@ public class WondexProtocol extends BaseProtocol {
Command.TYPE_GET_VERSION,
Command.TYPE_IDENTIFICATION);
setTextCommandEncoder(new WondexProtocolEncoder(this));
+ setSupportedTextCommands(
+ Command.TYPE_GET_DEVICE_STATUS,
+ Command.TYPE_GET_MODEM_STATUS,
+ Command.TYPE_REBOOT_DEVICE,
+ Command.TYPE_POSITION_SINGLE,
+ Command.TYPE_GET_VERSION,
+ Command.TYPE_IDENTIFICATION);
addServer(new TrackerServer(false, getName()) {
@Override
protected void addProtocolHandlers(PipelineBuilder pipeline) {