aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/DmtHttpProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-06-06 21:56:37 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-06-06 21:56:37 +1200
commit681b8f42633d7c6741e6fbac4308ba25c4aff9fa (patch)
tree488c6d1d43399899243adebcb565edd0cf294374 /src/org/traccar/protocol/DmtHttpProtocolDecoder.java
parent35bef1115f73da97b15ae3c1de03db1cd6d733c5 (diff)
downloadtrackermap-server-681b8f42633d7c6741e6fbac4308ba25c4aff9fa.tar.gz
trackermap-server-681b8f42633d7c6741e6fbac4308ba25c4aff9fa.tar.bz2
trackermap-server-681b8f42633d7c6741e6fbac4308ba25c4aff9fa.zip
Migrate D, E, F protocols
Diffstat (limited to 'src/org/traccar/protocol/DmtHttpProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/DmtHttpProtocolDecoder.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/DmtHttpProtocolDecoder.java b/src/org/traccar/protocol/DmtHttpProtocolDecoder.java
index 200a20759..bfe7d26a7 100644
--- a/src/org/traccar/protocol/DmtHttpProtocolDecoder.java
+++ b/src/org/traccar/protocol/DmtHttpProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 - 2018 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,9 +15,9 @@
*/
package org.traccar.protocol;
-import org.jboss.netty.channel.Channel;
-import org.jboss.netty.handler.codec.http.HttpRequest;
-import org.jboss.netty.handler.codec.http.HttpResponseStatus;
+import io.netty.channel.Channel;
+import io.netty.handler.codec.http.FullHttpRequest;
+import io.netty.handler.codec.http.HttpResponseStatus;
import org.traccar.BaseHttpProtocolDecoder;
import org.traccar.DeviceSession;
import org.traccar.helper.BitUtil;
@@ -46,9 +46,9 @@ public class DmtHttpProtocolDecoder extends BaseHttpProtocolDecoder {
protected Object decode(
Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {
- HttpRequest request = (HttpRequest) msg;
+ FullHttpRequest request = (FullHttpRequest) msg;
JsonObject root = Json.createReader(
- new StringReader(request.getContent().toString(StandardCharsets.US_ASCII))).readObject();
+ new StringReader(request.content().toString(StandardCharsets.US_ASCII))).readObject();
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));