diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-06-08 23:57:59 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-06-08 23:57:59 +1200 |
commit | fb543fb413652f4cb0408a6caafbdd7f4a4ca369 (patch) | |
tree | bda13c8001013f586ec7062608addf1b7e5a83ed /src/org/traccar/protocol/SpotProtocolDecoder.java | |
parent | ecb7bb33fcec52491f917dbc65a82990dcddb808 (diff) | |
download | trackermap-server-fb543fb413652f4cb0408a6caafbdd7f4a4ca369.tar.gz trackermap-server-fb543fb413652f4cb0408a6caafbdd7f4a4ca369.tar.bz2 trackermap-server-fb543fb413652f4cb0408a6caafbdd7f4a4ca369.zip |
Migrate R and S protocols
Diffstat (limited to 'src/org/traccar/protocol/SpotProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/SpotProtocolDecoder.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/SpotProtocolDecoder.java b/src/org/traccar/protocol/SpotProtocolDecoder.java index a8e666a32..16e287b6c 100644 --- a/src/org/traccar/protocol/SpotProtocolDecoder.java +++ b/src/org/traccar/protocol/SpotProtocolDecoder.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. @@ -16,9 +16,9 @@ package org.traccar.protocol; import com.fasterxml.jackson.databind.util.ByteBufferBackedInputStream; -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.DateUtil; @@ -60,9 +60,9 @@ public class SpotProtocolDecoder extends BaseHttpProtocolDecoder { protected Object decode( Channel channel, SocketAddress remoteAddress, Object msg) throws Exception { - HttpRequest request = (HttpRequest) msg; + FullHttpRequest request = (FullHttpRequest) msg; - Document document = documentBuilder.parse(new ByteBufferBackedInputStream(request.getContent().toByteBuffer())); + Document document = documentBuilder.parse(new ByteBufferBackedInputStream(request.content().nioBuffer())); NodeList nodes = (NodeList) messageExpression.evaluate(document, XPathConstants.NODESET); List<Position> positions = new LinkedList<>(); |