diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-11-21 07:06:05 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-11-21 07:06:05 +1300 |
commit | cdaa4672bd59a0a5333b9fefada615b82bd19ab5 (patch) | |
tree | 0c30bce98ea482ae6d92cd1769732fc4ace846a6 /src/org/traccar/protocol/OsmAndProtocolDecoder.java | |
parent | fb9cbb2b74dc0060bd0dc5d0b3bfeb958ed6f3b5 (diff) | |
download | trackermap-server-cdaa4672bd59a0a5333b9fefada615b82bd19ab5.tar.gz trackermap-server-cdaa4672bd59a0a5333b9fefada615b82bd19ab5.tar.bz2 trackermap-server-cdaa4672bd59a0a5333b9fefada615b82bd19ab5.zip |
Implement Oyster Sigfox protocol
Diffstat (limited to 'src/org/traccar/protocol/OsmAndProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/OsmAndProtocolDecoder.java | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/org/traccar/protocol/OsmAndProtocolDecoder.java b/src/org/traccar/protocol/OsmAndProtocolDecoder.java index 15a71c88b..68c143257 100644 --- a/src/org/traccar/protocol/OsmAndProtocolDecoder.java +++ b/src/org/traccar/protocol/OsmAndProtocolDecoder.java @@ -16,15 +16,11 @@ 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.HttpHeaders; 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.QueryStringDecoder; import org.joda.time.format.ISODateTimeFormat; -import org.traccar.BaseProtocolDecoder; +import org.traccar.BaseHttpProtocolDecoder; import org.traccar.DeviceSession; import org.traccar.model.Position; @@ -36,20 +32,12 @@ import java.util.Date; import java.util.List; import java.util.Map; -public class OsmAndProtocolDecoder extends BaseProtocolDecoder { +public class OsmAndProtocolDecoder extends BaseHttpProtocolDecoder { public OsmAndProtocolDecoder(OsmAndProtocol protocol) { super(protocol); } - 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); - } - } - @Override protected Object decode( Channel channel, SocketAddress remoteAddress, Object msg) throws Exception { |