aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/AtrackProtocol.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/AtrackProtocol.java')
-rw-r--r--src/org/traccar/protocol/AtrackProtocol.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/AtrackProtocol.java b/src/org/traccar/protocol/AtrackProtocol.java
index 2ab33ea6d..5104e5587 100644
--- a/src/org/traccar/protocol/AtrackProtocol.java
+++ b/src/org/traccar/protocol/AtrackProtocol.java
@@ -20,6 +20,7 @@ import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.ChannelPipeline;
import org.traccar.BaseProtocol;
import org.traccar.TrackerServer;
+import org.traccar.model.Command;
import java.util.List;
@@ -27,6 +28,8 @@ public class AtrackProtocol extends BaseProtocol {
public AtrackProtocol() {
super("atrack");
+ setSupportedDataCommands(
+ Command.TYPE_CUSTOM);
}
@Override
@@ -35,12 +38,14 @@ public class AtrackProtocol extends BaseProtocol {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new AtrackFrameDecoder());
+ pipeline.addLast("objectEncoder", new AtrackProtocolEncoder());
pipeline.addLast("objectDecoder", new AtrackProtocolDecoder(AtrackProtocol.this));
}
});
serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("objectEncoder", new AtrackProtocolEncoder());
pipeline.addLast("objectDecoder", new AtrackProtocolDecoder(AtrackProtocol.this));
}
});