aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/XexunProtocol.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-12-07 15:11:04 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-12-07 15:11:04 +1300
commitc674d90bc41e1a4b03fcc1779e711f8d8b79bf90 (patch)
tree7cec7ad8497434a27cc534422dd5de7f4abb4754 /src/org/traccar/protocol/XexunProtocol.java
parent9cbebefb5dd51130dd0856270643199777a30df6 (diff)
downloadtrackermap-server-c674d90bc41e1a4b03fcc1779e711f8d8b79bf90.tar.gz
trackermap-server-c674d90bc41e1a4b03fcc1779e711f8d8b79bf90.tar.bz2
trackermap-server-c674d90bc41e1a4b03fcc1779e711f8d8b79bf90.zip
Implement Xexun commands (fix #2639)
Diffstat (limited to 'src/org/traccar/protocol/XexunProtocol.java')
-rw-r--r--src/org/traccar/protocol/XexunProtocol.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/XexunProtocol.java b/src/org/traccar/protocol/XexunProtocol.java
index 2aea2f246..a52d9ff45 100644
--- a/src/org/traccar/protocol/XexunProtocol.java
+++ b/src/org/traccar/protocol/XexunProtocol.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2016 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.
@@ -23,6 +23,7 @@ import org.jboss.netty.handler.codec.string.StringEncoder;
import org.traccar.BaseProtocol;
import org.traccar.Context;
import org.traccar.TrackerServer;
+import org.traccar.model.Command;
import java.util.List;
@@ -30,6 +31,9 @@ public class XexunProtocol extends BaseProtocol {
public XexunProtocol() {
super("xexun");
+ setSupportedCommands(
+ Command.TYPE_ENGINE_STOP,
+ Command.TYPE_ENGINE_RESUME);
}
@Override
@@ -43,8 +47,9 @@ public class XexunProtocol extends BaseProtocol {
} else {
pipeline.addLast("frameDecoder", new XexunFrameDecoder());
}
- pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
+ pipeline.addLast("stringDecoder", new StringDecoder());
+ pipeline.addLast("objectEncoder", new XexunProtocolEncoder());
pipeline.addLast("objectDecoder", new XexunProtocolDecoder(XexunProtocol.this, full));
}
});