aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/database/ActiveDevice.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-03-15 16:02:37 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-03-15 16:02:37 -0700
commit606afeb37451f921fe3aecffab439cc2bcc7a175 (patch)
treecd4337cd546758cf70e66b89d09ef9a5189d5fcc /src/main/java/org/traccar/database/ActiveDevice.java
parent11dcacc2fdfd29f4440c8c46e501ef565f9b1dfd (diff)
downloadtrackermap-server-606afeb37451f921fe3aecffab439cc2bcc7a175.tar.gz
trackermap-server-606afeb37451f921fe3aecffab439cc2bcc7a175.tar.bz2
trackermap-server-606afeb37451f921fe3aecffab439cc2bcc7a175.zip
Queue HTTP commands
Diffstat (limited to 'src/main/java/org/traccar/database/ActiveDevice.java')
-rw-r--r--src/main/java/org/traccar/database/ActiveDevice.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/database/ActiveDevice.java b/src/main/java/org/traccar/database/ActiveDevice.java
index 34b3de227..e3ece6ad9 100644
--- a/src/main/java/org/traccar/database/ActiveDevice.java
+++ b/src/main/java/org/traccar/database/ActiveDevice.java
@@ -16,6 +16,8 @@
package org.traccar.database;
import io.netty.channel.Channel;
+import io.netty.handler.codec.http.HttpRequestDecoder;
+import org.traccar.BasePipelineFactory;
import org.traccar.Protocol;
import org.traccar.model.Command;
@@ -43,6 +45,10 @@ public class ActiveDevice {
return deviceId;
}
+ public boolean supportsLiveCommands() {
+ return BasePipelineFactory.getHandler(channel.pipeline(), HttpRequestDecoder.class) == null;
+ }
+
public void sendCommand(Command command) {
protocol.sendDataCommand(channel, remoteAddress, command);
}