aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/RuptelaProtocol.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-09-02 02:48:59 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-09-02 10:49:39 +1200
commit5cbf84b30f9b55f7c199289782b28ac71e0b8776 (patch)
treeb650948136349577b894222dedb17cf0fcb1c676 /src/org/traccar/protocol/RuptelaProtocol.java
parentbfcf42c5d55083bec83451400a432c7004f063c5 (diff)
downloadtrackermap-server-5cbf84b30f9b55f7c199289782b28ac71e0b8776.tar.gz
trackermap-server-5cbf84b30f9b55f7c199289782b28ac71e0b8776.tar.bz2
trackermap-server-5cbf84b30f9b55f7c199289782b28ac71e0b8776.zip
Implement custom command for Ruptela
Diffstat (limited to 'src/org/traccar/protocol/RuptelaProtocol.java')
-rw-r--r--src/org/traccar/protocol/RuptelaProtocol.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/RuptelaProtocol.java b/src/org/traccar/protocol/RuptelaProtocol.java
index d9ce4430b..d806c4c01 100644
--- a/src/org/traccar/protocol/RuptelaProtocol.java
+++ b/src/org/traccar/protocol/RuptelaProtocol.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.
@@ -20,6 +20,7 @@ import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder;
import org.traccar.BaseProtocol;
import org.traccar.TrackerServer;
+import org.traccar.model.Command;
import java.util.List;
@@ -27,6 +28,8 @@ public class RuptelaProtocol extends BaseProtocol {
public RuptelaProtocol() {
super("ruptela");
+ setSupportedCommands(
+ Command.TYPE_CUSTOM);
}
@Override
@@ -35,6 +38,7 @@ public class RuptelaProtocol extends BaseProtocol {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 0, 2, 2, 0));
+ pipeline.addLast("objectEncoder", new RuptelaProtocolEncoder());
pipeline.addLast("objectDecoder", new RuptelaProtocolDecoder(RuptelaProtocol.this));
}
});