aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/FlespiProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/FlespiProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/FlespiProtocolDecoder.java20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/org/traccar/protocol/FlespiProtocolDecoder.java b/src/org/traccar/protocol/FlespiProtocolDecoder.java
index 799d78ecb..d122df383 100644
--- a/src/org/traccar/protocol/FlespiProtocolDecoder.java
+++ b/src/org/traccar/protocol/FlespiProtocolDecoder.java
@@ -16,13 +16,9 @@
package org.traccar.protocol;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.handler.codec.http.DefaultHttpResponse;
import org.jboss.netty.handler.codec.http.HttpRequest;
-import org.jboss.netty.handler.codec.http.HttpResponse;
import org.jboss.netty.handler.codec.http.HttpResponseStatus;
-import org.jboss.netty.handler.codec.http.HttpVersion;
-import org.jboss.netty.handler.codec.http.HttpHeaders;
-import org.traccar.BaseProtocolDecoder;
+import org.traccar.BaseHttpProtocolDecoder;
import org.traccar.DeviceSession;
import org.traccar.model.Position;
@@ -34,11 +30,11 @@ import javax.json.JsonString;
import java.io.StringReader;
import java.net.SocketAddress;
import java.nio.charset.StandardCharsets;
-import java.util.List;
-import java.util.LinkedList;
import java.util.Date;
+import java.util.LinkedList;
+import java.util.List;
-public class FlespiProtocolDecoder extends BaseProtocolDecoder {
+public class FlespiProtocolDecoder extends BaseHttpProtocolDecoder {
public FlespiProtocolDecoder(FlespiProtocol protocol) {
super(protocol);
@@ -72,14 +68,6 @@ public class FlespiProtocolDecoder extends BaseProtocolDecoder {
return positions;
}
- private void sendResponse(Channel channel, HttpResponseStatus status) {
- if (channel != null) {
- HttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1, status);
- response.headers().add(HttpHeaders.Names.CONTENT_LENGTH, 0);
- channel.write(response);
- }
- }
-
private void decodePosition(JsonObject object, Position position) {
position.setProtocol(getProtocolName());