aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/WatchProtocol.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/WatchProtocol.java')
-rw-r--r--src/org/traccar/protocol/WatchProtocol.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/WatchProtocol.java b/src/org/traccar/protocol/WatchProtocol.java
index 1198f689e..05308a7e2 100644
--- a/src/org/traccar/protocol/WatchProtocol.java
+++ b/src/org/traccar/protocol/WatchProtocol.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2015 - 2016 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@ import org.jboss.netty.handler.codec.string.StringEncoder;
import org.traccar.BaseProtocol;
import org.traccar.CharacterDelimiterFrameDecoder;
import org.traccar.TrackerServer;
+import org.traccar.model.Command;
import java.util.List;
@@ -29,6 +30,8 @@ public class WatchProtocol extends BaseProtocol {
public WatchProtocol() {
super("watch");
+ setSupportedCommands(
+ Command.TYPE_REBOOT_DEVICE);
}
@Override
@@ -39,6 +42,7 @@ public class WatchProtocol extends BaseProtocol {
pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, ']'));
pipeline.addLast("stringEncoder", new StringEncoder());
pipeline.addLast("stringDecoder", new StringDecoder());
+ pipeline.addLast("objectEncoder", new WatchProtocolEncoder());
pipeline.addLast("objectDecoder", new WatchProtocolDecoder(WatchProtocol.this));
}
});