aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/XexunProtocol.java
diff options
context:
space:
mode:
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));
}
});