aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-07-12 12:28:28 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-07-12 12:28:28 +1200
commit639b427eba5738534c10f591e285d707e8b060e5 (patch)
treebdafa0f9751c77561ade92ebed272b6d6545ea43 /src/org/traccar
parent2badcd16f7ae0ce46f7c0cd241c635493d7e6508 (diff)
downloadtrackermap-server-639b427eba5738534c10f591e285d707e8b060e5.tar.gz
trackermap-server-639b427eba5738534c10f591e285d707e8b060e5.tar.bz2
trackermap-server-639b427eba5738534c10f591e285d707e8b060e5.zip
Re-factor decoder interface
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/ExtendedObjectDecoder.java25
-rw-r--r--src/org/traccar/FilterHandler.java7
-rw-r--r--src/org/traccar/RemoteAddressHandler.java13
-rw-r--r--src/org/traccar/ReverseGeocoderHandler.java8
-rw-r--r--src/org/traccar/protocol/ApelProtocolDecoder.java8
-rw-r--r--src/org/traccar/protocol/AplicomProtocolDecoder.java10
-rw-r--r--src/org/traccar/protocol/Ardi01ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/AtrackProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/AutoFon45ProtocolDecoder.java17
-rw-r--r--src/org/traccar/protocol/AutoFonProtocolDecoder.java10
-rw-r--r--src/org/traccar/protocol/Avl301ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/BceProtocolDecoder.java4
-rw-r--r--src/org/traccar/protocol/BoxProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/CalAmpProtocolDecoder.java24
-rw-r--r--src/org/traccar/protocol/CarTrackProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/CarscopProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/CastelProtocolDecoder.java10
-rw-r--r--src/org/traccar/protocol/CellocatorProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/EasyTrackProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/EelinkProtocolDecoder.java6
-rw-r--r--src/org/traccar/protocol/EnforaProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Ev603ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/FreedomProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/GalileoProtocolDecoder.java14
-rw-r--r--src/org/traccar/protocol/GatorProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Gl100ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Gl200ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/GlobalSatProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/GoSafeProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/GotopProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Gps103ProtocolDecoder.java3
-rw-r--r--src/org/traccar/protocol/GpsGateProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Gt02ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/H02ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/HaicomProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/IntellitracProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Jt600ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/KhdProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/LaipacProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/M2mProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/ManPowerProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/MaxonProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/MegastekProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/MeiligaoProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/MeitrackProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/MiniFinderProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Mta6ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/MtxProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/MxtProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/NavigilProtocolDecoder.java7
-rw-r--r--src/org/traccar/protocol/NavisProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/NoranProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/OrionProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/OsmAndProtocolDecoder.java6
-rw-r--r--src/org/traccar/protocol/PiligrimProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/ProgressProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Pt3000ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Pt502ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/RitiProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/RuptelaProtocolDecoder.java7
-rw-r--r--src/org/traccar/protocol/SanavProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/SkypatrolProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Stl060ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/SuntechProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/T55ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/TaipProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/TelikProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/TeltonikaProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Tk102ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Tk103ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Tlt2hProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/TopflytechProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/TotemProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Tr20ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Tr900ProtocolDecoder.java3
-rw-r--r--src/org/traccar/protocol/TrackboxProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/TramigoProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/TytanProtocolDecoder.java10
-rw-r--r--src/org/traccar/protocol/UlbotechProtocolDecoder.java7
-rw-r--r--src/org/traccar/protocol/V680ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/VisiontekProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/WialonProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/WondexProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/XexunProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/XirgoProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Xt013ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Xt7ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/YwtProtocolDecoder.java5
89 files changed, 273 insertions, 271 deletions
diff --git a/src/org/traccar/ExtendedObjectDecoder.java b/src/org/traccar/ExtendedObjectDecoder.java
index 55a75bb67..ad0210934 100644
--- a/src/org/traccar/ExtendedObjectDecoder.java
+++ b/src/org/traccar/ExtendedObjectDecoder.java
@@ -15,17 +15,15 @@
*/
package org.traccar;
+import java.net.SocketAddress;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelEvent;
import org.jboss.netty.channel.ChannelHandlerContext;
-import org.jboss.netty.channel.MessageEvent;
-import org.jboss.netty.handler.codec.oneone.OneToOneDecoder;
-
-import java.net.SocketAddress;
-
+import org.jboss.netty.channel.ChannelUpstreamHandler;
import static org.jboss.netty.channel.Channels.fireMessageReceived;
+import org.jboss.netty.channel.MessageEvent;
-public abstract class ExtendedObjectDecoder extends OneToOneDecoder {
+public abstract class ExtendedObjectDecoder implements ChannelUpstreamHandler {
@Override
public void handleUpstream(
@@ -37,7 +35,7 @@ public abstract class ExtendedObjectDecoder extends OneToOneDecoder {
MessageEvent e = (MessageEvent) evt;
Object originalMessage = e.getMessage();
- Object decodedMessage = decode(ctx, e.getChannel(), e.getRemoteAddress(), originalMessage);
+ Object decodedMessage = decode(e.getChannel(), e.getRemoteAddress(), originalMessage);
if (originalMessage == decodedMessage) {
ctx.sendUpstream(evt);
} else if (decodedMessage != null) {
@@ -45,17 +43,6 @@ public abstract class ExtendedObjectDecoder extends OneToOneDecoder {
}
}
- protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {
-
- return decode(ctx, channel, msg);
- }
-
- @Override
- protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception {
-
- return null; // default implementation
- }
+ protected abstract Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception;
}
diff --git a/src/org/traccar/FilterHandler.java b/src/org/traccar/FilterHandler.java
index 9b80afec5..e5a06579c 100644
--- a/src/org/traccar/FilterHandler.java
+++ b/src/org/traccar/FilterHandler.java
@@ -15,17 +15,16 @@
*/
package org.traccar;
+import java.net.SocketAddress;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-import org.jboss.netty.handler.codec.oneone.OneToOneDecoder;
import org.traccar.helper.DistanceCalculator;
import org.traccar.helper.Log;
import org.traccar.model.Position;
-public class FilterHandler extends OneToOneDecoder {
+public class FilterHandler extends ExtendedObjectDecoder {
private boolean filterInvalid;
private boolean filterZero;
@@ -146,7 +145,7 @@ public class FilterHandler extends OneToOneDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
if (msg instanceof Position) {
diff --git a/src/org/traccar/RemoteAddressHandler.java b/src/org/traccar/RemoteAddressHandler.java
index 3aa28daf7..d9522020d 100644
--- a/src/org/traccar/RemoteAddressHandler.java
+++ b/src/org/traccar/RemoteAddressHandler.java
@@ -15,23 +15,18 @@
*/
package org.traccar;
-import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-import org.jboss.netty.handler.codec.oneone.OneToOneDecoder;
-import org.traccar.geocode.AddressFormat;
-import org.traccar.geocode.ReverseGeocoder;
-import org.traccar.model.Event;
-import org.traccar.model.Position;
-
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.util.List;
+import org.jboss.netty.channel.Channel;
+import org.traccar.model.Event;
+import org.traccar.model.Position;
public class RemoteAddressHandler extends ExtendedObjectDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String hostAddress = ((InetSocketAddress) remoteAddress).getAddress().getHostAddress();
diff --git a/src/org/traccar/ReverseGeocoderHandler.java b/src/org/traccar/ReverseGeocoderHandler.java
index 73254673c..aaa491ae7 100644
--- a/src/org/traccar/ReverseGeocoderHandler.java
+++ b/src/org/traccar/ReverseGeocoderHandler.java
@@ -15,16 +15,14 @@
*/
package org.traccar;
+import java.net.SocketAddress;
import java.util.List;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-import org.jboss.netty.handler.codec.oneone.OneToOneDecoder;
import org.traccar.geocode.AddressFormat;
import org.traccar.geocode.ReverseGeocoder;
-import org.traccar.model.Event;
import org.traccar.model.Position;
-public class ReverseGeocoderHandler extends OneToOneDecoder {
+public class ReverseGeocoderHandler extends ExtendedObjectDecoder {
private final ReverseGeocoder geocoder;
private final boolean processInvalidPositions;
@@ -38,7 +36,7 @@ public class ReverseGeocoderHandler extends OneToOneDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
if (geocoder != null) {
diff --git a/src/org/traccar/protocol/ApelProtocolDecoder.java b/src/org/traccar/protocol/ApelProtocolDecoder.java
index 85a4e771a..9a25a4fff 100644
--- a/src/org/traccar/protocol/ApelProtocolDecoder.java
+++ b/src/org/traccar/protocol/ApelProtocolDecoder.java
@@ -17,16 +17,14 @@ package org.traccar.protocol;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
import java.util.TimeZone;
-
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.Crc;
import org.traccar.helper.Log;
@@ -97,7 +95,7 @@ public class ApelProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/AplicomProtocolDecoder.java b/src/org/traccar/protocol/AplicomProtocolDecoder.java
index 573cccecf..ff8858744 100644
--- a/src/org/traccar/protocol/AplicomProtocolDecoder.java
+++ b/src/org/traccar/protocol/AplicomProtocolDecoder.java
@@ -15,17 +15,11 @@
*/
package org.traccar.protocol;
-import java.util.ArrayList;
+import java.net.SocketAddress;
import java.util.Date;
-
import org.jboss.netty.buffer.ChannelBuffer;
-import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
-import org.traccar.Context;
-import org.traccar.helper.ChannelBufferTools;
import org.traccar.helper.Crc;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
@@ -82,7 +76,7 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/Ardi01ProtocolDecoder.java b/src/org/traccar/protocol/Ardi01ProtocolDecoder.java
index dcc342b97..0a0ef0bca 100644
--- a/src/org/traccar/protocol/Ardi01ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Ardi01ProtocolDecoder.java
@@ -22,7 +22,8 @@ import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
import org.traccar.model.Position;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -49,7 +50,7 @@ public class Ardi01ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/AtrackProtocolDecoder.java b/src/org/traccar/protocol/AtrackProtocolDecoder.java
index 6a346f946..1f8ec9a1f 100644
--- a/src/org/traccar/protocol/AtrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/AtrackProtocolDecoder.java
@@ -20,12 +20,9 @@ import java.nio.charset.Charset;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
-
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
@@ -67,7 +64,7 @@ public class AtrackProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/AutoFon45ProtocolDecoder.java b/src/org/traccar/protocol/AutoFon45ProtocolDecoder.java
index 4fbf05c94..762cb4d8d 100644
--- a/src/org/traccar/protocol/AutoFon45ProtocolDecoder.java
+++ b/src/org/traccar/protocol/AutoFon45ProtocolDecoder.java
@@ -15,19 +15,19 @@
*/
package org.traccar.protocol;
-import static org.traccar.protocol.AutoFon45FrameDecoder.MSG_LOGIN;
-import static org.traccar.protocol.AutoFon45FrameDecoder.MSG_LOCATION;
-
+import java.net.SocketAddress;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.ChannelBufferTools;
import org.traccar.model.Event;
import org.traccar.model.Position;
-
-import java.util.*;
+import static org.traccar.protocol.AutoFon45FrameDecoder.MSG_LOCATION;
+import static org.traccar.protocol.AutoFon45FrameDecoder.MSG_LOGIN;
public class AutoFon45ProtocolDecoder extends BaseProtocolDecoder {
@@ -41,7 +41,10 @@ public class AutoFon45ProtocolDecoder extends BaseProtocolDecoder {
}
@Override
- protected Object decode(ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception {
+ protected Object decode(
+ Channel channel, SocketAddress remoteAddress, Object msg)
+ throws Exception {
+
ChannelBuffer buf = (ChannelBuffer) msg;
int type = buf.getUnsignedByte(0);
diff --git a/src/org/traccar/protocol/AutoFonProtocolDecoder.java b/src/org/traccar/protocol/AutoFonProtocolDecoder.java
index b23f7a562..810d666dd 100644
--- a/src/org/traccar/protocol/AutoFonProtocolDecoder.java
+++ b/src/org/traccar/protocol/AutoFonProtocolDecoder.java
@@ -15,17 +15,19 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
+import java.util.Calendar;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.ChannelBufferTools;
import org.traccar.model.Event;
import org.traccar.model.Position;
-import java.util.*;
-
public class AutoFonProtocolDecoder extends BaseProtocolDecoder {
public AutoFonProtocolDecoder(AutoFonProtocol protocol) {
@@ -108,7 +110,7 @@ public class AutoFonProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/Avl301ProtocolDecoder.java b/src/org/traccar/protocol/Avl301ProtocolDecoder.java
index c4ce150c2..6359ba80d 100644
--- a/src/org/traccar/protocol/Avl301ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Avl301ProtocolDecoder.java
@@ -23,7 +23,8 @@ import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
import org.traccar.model.Position;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
public class Avl301ProtocolDecoder extends BaseProtocolDecoder {
@@ -61,7 +62,7 @@ public class Avl301ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/BceProtocolDecoder.java b/src/org/traccar/protocol/BceProtocolDecoder.java
index 763f35d0c..4255ebde2 100644
--- a/src/org/traccar/protocol/BceProtocolDecoder.java
+++ b/src/org/traccar/protocol/BceProtocolDecoder.java
@@ -15,6 +15,7 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
import java.nio.ByteOrder;
import java.util.Date;
import java.util.LinkedList;
@@ -22,7 +23,6 @@ import java.util.List;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.BitUtil;
import org.traccar.model.Event;
@@ -44,7 +44,7 @@ public class BceProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/BoxProtocolDecoder.java b/src/org/traccar/protocol/BoxProtocolDecoder.java
index 77e546cda..ffc9f9bd0 100644
--- a/src/org/traccar/protocol/BoxProtocolDecoder.java
+++ b/src/org/traccar/protocol/BoxProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -49,7 +50,7 @@ public class BoxProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/CalAmpProtocolDecoder.java b/src/org/traccar/protocol/CalAmpProtocolDecoder.java
index 99d8651de..51a2025b8 100644
--- a/src/org/traccar/protocol/CalAmpProtocolDecoder.java
+++ b/src/org/traccar/protocol/CalAmpProtocolDecoder.java
@@ -17,14 +17,9 @@ package org.traccar.protocol;
import java.net.SocketAddress;
import java.util.Date;
-
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelEvent;
-import org.jboss.netty.channel.ChannelHandlerContext;
-import org.jboss.netty.channel.Channels;
-import org.jboss.netty.channel.MessageEvent;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
@@ -53,23 +48,6 @@ public class CalAmpProtocolDecoder extends BaseProtocolDecoder {
private static final int SERVICE_ACKNOWLEDGED = 1;
private static final int SERVICE_RESPONSE = 2;
- @Override
- public void handleUpstream(
- ChannelHandlerContext ctx, ChannelEvent evt)
- throws Exception {
-
- if (!(evt instanceof MessageEvent)) {
- ctx.sendUpstream(evt);
- return;
- }
-
- MessageEvent e = (MessageEvent) evt;
- Object decodedMessage = decode(ctx, e.getChannel(), e.getMessage(), e.getRemoteAddress());
- if (decodedMessage != null) {
- Channels.fireMessageReceived(ctx, decodedMessage, e.getRemoteAddress());
- }
- }
-
private void sendResponse(Channel channel, SocketAddress remoteAddress, int type, int index, int result) {
if (channel != null) {
ChannelBuffer response = ChannelBuffers.directBuffer(10);
@@ -85,7 +63,7 @@ public class CalAmpProtocolDecoder extends BaseProtocolDecoder {
}
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg, SocketAddress remoteAddress)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/CarTrackProtocolDecoder.java b/src/org/traccar/protocol/CarTrackProtocolDecoder.java
index fea4f6a5e..fc14b4668 100644
--- a/src/org/traccar/protocol/CarTrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/CarTrackProtocolDecoder.java
@@ -16,7 +16,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -57,7 +58,7 @@ public class CarTrackProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/CarscopProtocolDecoder.java b/src/org/traccar/protocol/CarscopProtocolDecoder.java
index d9c18d0b5..08ab10528 100644
--- a/src/org/traccar/protocol/CarscopProtocolDecoder.java
+++ b/src/org/traccar/protocol/CarscopProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -49,7 +50,7 @@ public class CarscopProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/CastelProtocolDecoder.java b/src/org/traccar/protocol/CastelProtocolDecoder.java
index e67f5ca39..3a09822b3 100644
--- a/src/org/traccar/protocol/CastelProtocolDecoder.java
+++ b/src/org/traccar/protocol/CastelProtocolDecoder.java
@@ -18,12 +18,14 @@ package org.traccar.protocol;
import java.net.SocketAddress;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
-import java.util.*;
-
+import java.util.Calendar;
+import java.util.Date;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.Crc;
import org.traccar.helper.UnitsConverter;
@@ -74,7 +76,7 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/CellocatorProtocolDecoder.java b/src/org/traccar/protocol/CellocatorProtocolDecoder.java
index 6c3343224..af148c1eb 100644
--- a/src/org/traccar/protocol/CellocatorProtocolDecoder.java
+++ b/src/org/traccar/protocol/CellocatorProtocolDecoder.java
@@ -16,7 +16,8 @@
package org.traccar.protocol;
import java.nio.ByteOrder;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
@@ -84,7 +85,7 @@ public class CellocatorProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/EasyTrackProtocolDecoder.java b/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
index 0a08d6394..5292e90a7 100644
--- a/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -60,7 +61,7 @@ public class EasyTrackProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/EelinkProtocolDecoder.java b/src/org/traccar/protocol/EelinkProtocolDecoder.java
index 3cdf3977e..8bcc70c19 100644
--- a/src/org/traccar/protocol/EelinkProtocolDecoder.java
+++ b/src/org/traccar/protocol/EelinkProtocolDecoder.java
@@ -15,13 +15,11 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
import java.util.Date;
-
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.ChannelBufferTools;
import org.traccar.helper.UnitsConverter;
@@ -69,7 +67,7 @@ public class EelinkProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/EnforaProtocolDecoder.java b/src/org/traccar/protocol/EnforaProtocolDecoder.java
index 13148641a..353547aef 100644
--- a/src/org/traccar/protocol/EnforaProtocolDecoder.java
+++ b/src/org/traccar/protocol/EnforaProtocolDecoder.java
@@ -16,7 +16,8 @@
package org.traccar.protocol;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -53,7 +54,7 @@ public class EnforaProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/Ev603ProtocolDecoder.java b/src/org/traccar/protocol/Ev603ProtocolDecoder.java
index 8686088cb..898e5802d 100644
--- a/src/org/traccar/protocol/Ev603ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Ev603ProtocolDecoder.java
@@ -16,7 +16,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -45,7 +46,7 @@ public class Ev603ProtocolDecoder extends BaseProtocolDecoder{
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/FreedomProtocolDecoder.java b/src/org/traccar/protocol/FreedomProtocolDecoder.java
index d6e641bb1..b095b9a39 100644
--- a/src/org/traccar/protocol/FreedomProtocolDecoder.java
+++ b/src/org/traccar/protocol/FreedomProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -44,7 +45,7 @@ public class FreedomProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
// Parse message
diff --git a/src/org/traccar/protocol/GalileoProtocolDecoder.java b/src/org/traccar/protocol/GalileoProtocolDecoder.java
index acf95a552..66eb1f2cc 100644
--- a/src/org/traccar/protocol/GalileoProtocolDecoder.java
+++ b/src/org/traccar/protocol/GalileoProtocolDecoder.java
@@ -15,15 +15,19 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
-import java.util.*;
-
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.Log;
import org.traccar.model.Event;
@@ -79,7 +83,7 @@ public class GalileoProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/GatorProtocolDecoder.java b/src/org/traccar/protocol/GatorProtocolDecoder.java
index 6a3434c8a..635362f48 100644
--- a/src/org/traccar/protocol/GatorProtocolDecoder.java
+++ b/src/org/traccar/protocol/GatorProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
@@ -48,7 +49,7 @@ public class GatorProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/Gl100ProtocolDecoder.java b/src/org/traccar/protocol/Gl100ProtocolDecoder.java
index 7746395a1..ffb4605a0 100644
--- a/src/org/traccar/protocol/Gl100ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gl100ProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -52,7 +53,7 @@ public class Gl100ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/Gl200ProtocolDecoder.java
index a3fb8ee4b..b71ace1a1 100644
--- a/src/org/traccar/protocol/Gl200ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gl200ProtocolDecoder.java
@@ -20,10 +20,7 @@ import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.Context;
import org.traccar.helper.UnitsConverter;
@@ -67,7 +64,7 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
index e427def3a..c411b4c25 100644
--- a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
+++ b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.Properties;
import java.util.TimeZone;
import java.util.regex.Matcher;
@@ -264,7 +265,7 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/GoSafeProtocolDecoder.java b/src/org/traccar/protocol/GoSafeProtocolDecoder.java
index 0a24e7029..758d9a71d 100644
--- a/src/org/traccar/protocol/GoSafeProtocolDecoder.java
+++ b/src/org/traccar/protocol/GoSafeProtocolDecoder.java
@@ -20,10 +20,7 @@ import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
import org.traccar.model.Position;
@@ -52,7 +49,7 @@ public class GoSafeProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/GotopProtocolDecoder.java b/src/org/traccar/protocol/GotopProtocolDecoder.java
index 81b17b29f..f113afad5 100644
--- a/src/org/traccar/protocol/GotopProtocolDecoder.java
+++ b/src/org/traccar/protocol/GotopProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -49,7 +50,7 @@ public class GotopProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
// Parse message
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
index fcfcb3dbb..570ebe8c0 100644
--- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
@@ -21,7 +21,6 @@ import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
import org.traccar.model.Position;
@@ -63,7 +62,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/GpsGateProtocolDecoder.java b/src/org/traccar/protocol/GpsGateProtocolDecoder.java
index 011ec1219..5a69d6621 100644
--- a/src/org/traccar/protocol/GpsGateProtocolDecoder.java
+++ b/src/org/traccar/protocol/GpsGateProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -54,7 +55,7 @@ public class GpsGateProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Gt02ProtocolDecoder.java b/src/org/traccar/protocol/Gt02ProtocolDecoder.java
index 8d775a2bb..b542cec22 100644
--- a/src/org/traccar/protocol/Gt02ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt02ProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
@@ -50,7 +51,7 @@ public class Gt02ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index f5a8dc307..5e527dd9c 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -26,7 +26,8 @@ import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
import org.traccar.model.Position;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.Properties;
import java.util.TimeZone;
@@ -92,7 +93,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/H02ProtocolDecoder.java b/src/org/traccar/protocol/H02ProtocolDecoder.java
index 95d80edb5..e3130305b 100644
--- a/src/org/traccar/protocol/H02ProtocolDecoder.java
+++ b/src/org/traccar/protocol/H02ProtocolDecoder.java
@@ -16,7 +16,8 @@
package org.traccar.protocol;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -181,7 +182,7 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/HaicomProtocolDecoder.java b/src/org/traccar/protocol/HaicomProtocolDecoder.java
index 27fb05d34..b7cc29ddf 100644
--- a/src/org/traccar/protocol/HaicomProtocolDecoder.java
+++ b/src/org/traccar/protocol/HaicomProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -54,7 +55,7 @@ public class HaicomProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/IntellitracProtocolDecoder.java b/src/org/traccar/protocol/IntellitracProtocolDecoder.java
index 9b99fc408..b34753f1d 100644
--- a/src/org/traccar/protocol/IntellitracProtocolDecoder.java
+++ b/src/org/traccar/protocol/IntellitracProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -63,7 +64,7 @@ public class IntellitracProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Jt600ProtocolDecoder.java b/src/org/traccar/protocol/Jt600ProtocolDecoder.java
index eaf9ff9c6..45eeb5c4d 100644
--- a/src/org/traccar/protocol/Jt600ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Jt600ProtocolDecoder.java
@@ -16,7 +16,8 @@
package org.traccar.protocol;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -201,7 +202,7 @@ public class Jt600ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/KhdProtocolDecoder.java b/src/org/traccar/protocol/KhdProtocolDecoder.java
index 335e84697..bff7568a7 100644
--- a/src/org/traccar/protocol/KhdProtocolDecoder.java
+++ b/src/org/traccar/protocol/KhdProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
@@ -56,7 +57,7 @@ public class KhdProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/LaipacProtocolDecoder.java b/src/org/traccar/protocol/LaipacProtocolDecoder.java
index e5838387a..8d111b05c 100644
--- a/src/org/traccar/protocol/LaipacProtocolDecoder.java
+++ b/src/org/traccar/protocol/LaipacProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -51,7 +52,7 @@ public class LaipacProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/M2mProtocolDecoder.java b/src/org/traccar/protocol/M2mProtocolDecoder.java
index 10df475b3..ac1d8b7dc 100644
--- a/src/org/traccar/protocol/M2mProtocolDecoder.java
+++ b/src/org/traccar/protocol/M2mProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
@@ -36,7 +37,7 @@ public class M2mProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/ManPowerProtocolDecoder.java b/src/org/traccar/protocol/ManPowerProtocolDecoder.java
index 7070e8e39..aef64d69e 100644
--- a/src/org/traccar/protocol/ManPowerProtocolDecoder.java
+++ b/src/org/traccar/protocol/ManPowerProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -51,7 +52,7 @@ public class ManPowerProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/MaxonProtocolDecoder.java b/src/org/traccar/protocol/MaxonProtocolDecoder.java
index c65476590..1ab37dc7d 100644
--- a/src/org/traccar/protocol/MaxonProtocolDecoder.java
+++ b/src/org/traccar/protocol/MaxonProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -57,7 +58,7 @@ public class MaxonProtocolDecoder extends BaseProtocolDecoder {
static private Pattern gpfidPattern = Pattern.compile("\\$GPFID,(\\d+)$");
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/MegastekProtocolDecoder.java b/src/org/traccar/protocol/MegastekProtocolDecoder.java
index 5b9f0408c..e35b75869 100644
--- a/src/org/traccar/protocol/MegastekProtocolDecoder.java
+++ b/src/org/traccar/protocol/MegastekProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -129,7 +130,7 @@ public class MegastekProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java
index faa2f122e..f0b3ee9e6 100644
--- a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java
+++ b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java
@@ -17,7 +17,8 @@ package org.traccar.protocol;
import java.net.InetSocketAddress;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.Properties;
import java.util.TimeZone;
import java.util.regex.Matcher;
@@ -128,7 +129,7 @@ public class MeiligaoProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/MeitrackProtocolDecoder.java b/src/org/traccar/protocol/MeitrackProtocolDecoder.java
index 4e6927e56..adbaa6e58 100644
--- a/src/org/traccar/protocol/MeitrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/MeitrackProtocolDecoder.java
@@ -16,7 +16,8 @@
package org.traccar.protocol;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
@@ -260,7 +261,7 @@ public class MeitrackProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java
index cd1cc4eec..cd9da419a 100644
--- a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java
+++ b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -50,7 +51,7 @@ public class MiniFinderProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Mta6ProtocolDecoder.java b/src/org/traccar/protocol/Mta6ProtocolDecoder.java
index 8872ba76a..e83c84583 100644
--- a/src/org/traccar/protocol/Mta6ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Mta6ProtocolDecoder.java
@@ -16,7 +16,8 @@
package org.traccar.protocol;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
@@ -278,7 +279,7 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
HttpRequest request = (HttpRequest) msg;
diff --git a/src/org/traccar/protocol/MtxProtocolDecoder.java b/src/org/traccar/protocol/MtxProtocolDecoder.java
index 860f3a5a0..1203313f9 100644
--- a/src/org/traccar/protocol/MtxProtocolDecoder.java
+++ b/src/org/traccar/protocol/MtxProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -53,7 +54,7 @@ public class MtxProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/MxtProtocolDecoder.java b/src/org/traccar/protocol/MxtProtocolDecoder.java
index b6d9a2f9e..7f5ccabb2 100644
--- a/src/org/traccar/protocol/MxtProtocolDecoder.java
+++ b/src/org/traccar/protocol/MxtProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
@@ -39,7 +40,7 @@ public class MxtProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/NavigilProtocolDecoder.java b/src/org/traccar/protocol/NavigilProtocolDecoder.java
index 711a51047..2b75e7840 100644
--- a/src/org/traccar/protocol/NavigilProtocolDecoder.java
+++ b/src/org/traccar/protocol/NavigilProtocolDecoder.java
@@ -15,14 +15,12 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
import java.nio.ByteOrder;
import java.util.Date;
-
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.Crc;
import org.traccar.helper.UnitsConverter;
@@ -264,7 +262,8 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder {
}
@Override
- protected Object decode(ChannelHandlerContext ctx, Channel channel, Object msg)
+ protected Object decode(
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/NavisProtocolDecoder.java b/src/org/traccar/protocol/NavisProtocolDecoder.java
index 94dcec1a4..02d408575 100644
--- a/src/org/traccar/protocol/NavisProtocolDecoder.java
+++ b/src/org/traccar/protocol/NavisProtocolDecoder.java
@@ -17,7 +17,8 @@ package org.traccar.protocol;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
import java.util.TimeZone;
@@ -282,7 +283,7 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/NoranProtocolDecoder.java b/src/org/traccar/protocol/NoranProtocolDecoder.java
index f7eb26e97..66116be0a 100644
--- a/src/org/traccar/protocol/NoranProtocolDecoder.java
+++ b/src/org/traccar/protocol/NoranProtocolDecoder.java
@@ -22,12 +22,9 @@ import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.TimeZone;
-
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
import org.traccar.model.Position;
@@ -50,7 +47,7 @@ public class NoranProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/OrionProtocolDecoder.java b/src/org/traccar/protocol/OrionProtocolDecoder.java
index e43ced8a5..daf52750b 100644
--- a/src/org/traccar/protocol/OrionProtocolDecoder.java
+++ b/src/org/traccar/protocol/OrionProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
import java.util.TimeZone;
@@ -56,7 +57,7 @@ public class OrionProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/OsmAndProtocolDecoder.java b/src/org/traccar/protocol/OsmAndProtocolDecoder.java
index 91f15e098..f89406a00 100644
--- a/src/org/traccar/protocol/OsmAndProtocolDecoder.java
+++ b/src/org/traccar/protocol/OsmAndProtocolDecoder.java
@@ -15,23 +15,21 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
import java.nio.charset.Charset;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
-
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelFutureListener;
-import org.jboss.netty.channel.ChannelHandlerContext;
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.QueryStringDecoder;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
import org.traccar.model.Position;
@@ -44,7 +42,7 @@ public class OsmAndProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
HttpRequest request = (HttpRequest) msg;
diff --git a/src/org/traccar/protocol/PiligrimProtocolDecoder.java b/src/org/traccar/protocol/PiligrimProtocolDecoder.java
index f3c9056af..7f6d9463e 100644
--- a/src/org/traccar/protocol/PiligrimProtocolDecoder.java
+++ b/src/org/traccar/protocol/PiligrimProtocolDecoder.java
@@ -17,7 +17,8 @@ package org.traccar.protocol;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
import java.util.TimeZone;
@@ -59,7 +60,7 @@ public class PiligrimProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
HttpRequest request = (HttpRequest) msg;
diff --git a/src/org/traccar/protocol/ProgressProtocolDecoder.java b/src/org/traccar/protocol/ProgressProtocolDecoder.java
index 4c3e58ddc..bb29532bf 100644
--- a/src/org/traccar/protocol/ProgressProtocolDecoder.java
+++ b/src/org/traccar/protocol/ProgressProtocolDecoder.java
@@ -17,7 +17,8 @@ package org.traccar.protocol;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
import java.util.TimeZone;
@@ -66,7 +67,7 @@ public class ProgressProtocolDecoder extends BaseProtocolDecoder {
}
@Override
- protected Object decode(ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception {
+ protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
int type = buf.readUnsignedShort();
diff --git a/src/org/traccar/protocol/Pt3000ProtocolDecoder.java b/src/org/traccar/protocol/Pt3000ProtocolDecoder.java
index ebfded3d5..e226a8fb2 100644
--- a/src/org/traccar/protocol/Pt3000ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Pt3000ProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -48,7 +49,7 @@ public class Pt3000ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Pt502ProtocolDecoder.java b/src/org/traccar/protocol/Pt502ProtocolDecoder.java
index 145d3d42d..310c345b0 100644
--- a/src/org/traccar/protocol/Pt502ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Pt502ProtocolDecoder.java
@@ -16,7 +16,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -58,7 +59,7 @@ public class Pt502ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/RitiProtocolDecoder.java b/src/org/traccar/protocol/RitiProtocolDecoder.java
index b684ad2e7..98003bbcf 100644
--- a/src/org/traccar/protocol/RitiProtocolDecoder.java
+++ b/src/org/traccar/protocol/RitiProtocolDecoder.java
@@ -16,7 +16,8 @@
package org.traccar.protocol;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -51,7 +52,7 @@ public class RitiProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/org/traccar/protocol/RuptelaProtocolDecoder.java
index 7938026e8..b81b5b248 100644
--- a/src/org/traccar/protocol/RuptelaProtocolDecoder.java
+++ b/src/org/traccar/protocol/RuptelaProtocolDecoder.java
@@ -15,15 +15,13 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
-
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
@@ -38,7 +36,8 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder {
private static final int COMMAND_RECORDS = 0x01;
@Override
- protected Object decode(ChannelHandlerContext ctx, Channel channel, Object msg)
+ protected Object decode(
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/SanavProtocolDecoder.java b/src/org/traccar/protocol/SanavProtocolDecoder.java
index d8c3bd65b..729ed9793 100644
--- a/src/org/traccar/protocol/SanavProtocolDecoder.java
+++ b/src/org/traccar/protocol/SanavProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -49,7 +50,7 @@ public class SanavProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
// Parse message
diff --git a/src/org/traccar/protocol/SkypatrolProtocolDecoder.java b/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
index a23ebc1e6..55efc48c6 100644
--- a/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
+++ b/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
@@ -16,7 +16,8 @@
package org.traccar.protocol;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
@@ -48,7 +49,7 @@ public class SkypatrolProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/Stl060ProtocolDecoder.java b/src/org/traccar/protocol/Stl060ProtocolDecoder.java
index d9c21b441..c082ed479 100644
--- a/src/org/traccar/protocol/Stl060ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Stl060ProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -69,7 +70,7 @@ public class Stl060ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/SuntechProtocolDecoder.java b/src/org/traccar/protocol/SuntechProtocolDecoder.java
index f7b109cb0..aade44e4f 100644
--- a/src/org/traccar/protocol/SuntechProtocolDecoder.java
+++ b/src/org/traccar/protocol/SuntechProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -51,7 +52,7 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/T55ProtocolDecoder.java b/src/org/traccar/protocol/T55ProtocolDecoder.java
index ce9f98f2d..63444ccd4 100644
--- a/src/org/traccar/protocol/T55ProtocolDecoder.java
+++ b/src/org/traccar/protocol/T55ProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -81,7 +82,7 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/TaipProtocolDecoder.java b/src/org/traccar/protocol/TaipProtocolDecoder.java
index 518efac0d..b21eb5f5a 100644
--- a/src/org/traccar/protocol/TaipProtocolDecoder.java
+++ b/src/org/traccar/protocol/TaipProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
import java.util.regex.Matcher;
@@ -89,7 +90,7 @@ public class TaipProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/TelikProtocolDecoder.java b/src/org/traccar/protocol/TelikProtocolDecoder.java
index ece134c83..9a7a1652a 100644
--- a/src/org/traccar/protocol/TelikProtocolDecoder.java
+++ b/src/org/traccar/protocol/TelikProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -51,7 +52,7 @@ public class TelikProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
// Parse message
diff --git a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
index 37168ce22..eff04f7cf 100644
--- a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
+++ b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
@@ -15,6 +15,7 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
import java.nio.charset.Charset;
import java.util.Date;
import java.util.LinkedList;
@@ -22,7 +23,6 @@ import java.util.List;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.BitUtil;
import org.traccar.helper.UnitsConverter;
@@ -197,7 +197,8 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder {
}
@Override
- protected Object decode(ChannelHandlerContext ctx, Channel channel, Object msg)
+ protected Object decode(
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/Tk102ProtocolDecoder.java b/src/org/traccar/protocol/Tk102ProtocolDecoder.java
index 2a752f16f..a278d65df 100644
--- a/src/org/traccar/protocol/Tk102ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tk102ProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -46,7 +47,7 @@ public class Tk102ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Tk103ProtocolDecoder.java b/src/org/traccar/protocol/Tk103ProtocolDecoder.java
index fb83c59d8..1b34f3f81 100644
--- a/src/org/traccar/protocol/Tk103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tk103ProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -53,7 +54,7 @@ public class Tk103ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Tlt2hProtocolDecoder.java b/src/org/traccar/protocol/Tlt2hProtocolDecoder.java
index fed224937..b242a2232 100644
--- a/src/org/traccar/protocol/Tlt2hProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tlt2hProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
import java.util.TimeZone;
@@ -58,7 +59,7 @@ public class Tlt2hProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/TopflytechProtocolDecoder.java b/src/org/traccar/protocol/TopflytechProtocolDecoder.java
index c2aafdea3..4a3eb533e 100644
--- a/src/org/traccar/protocol/TopflytechProtocolDecoder.java
+++ b/src/org/traccar/protocol/TopflytechProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -48,7 +49,7 @@ public class TopflytechProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/TotemProtocolDecoder.java b/src/org/traccar/protocol/TotemProtocolDecoder.java
index b348089ff..ef4c6e5eb 100644
--- a/src/org/traccar/protocol/TotemProtocolDecoder.java
+++ b/src/org/traccar/protocol/TotemProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -128,7 +129,7 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Tr20ProtocolDecoder.java b/src/org/traccar/protocol/Tr20ProtocolDecoder.java
index c278fef73..3a05fadd8 100644
--- a/src/org/traccar/protocol/Tr20ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tr20ProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -52,7 +53,7 @@ public class Tr20ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Tr900ProtocolDecoder.java b/src/org/traccar/protocol/Tr900ProtocolDecoder.java
index ff99a8e8a..0af0a8e24 100644
--- a/src/org/traccar/protocol/Tr900ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tr900ProtocolDecoder.java
@@ -21,7 +21,6 @@ import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
import org.traccar.model.Position;
@@ -56,7 +55,7 @@ public class Tr900ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/TrackboxProtocolDecoder.java b/src/org/traccar/protocol/TrackboxProtocolDecoder.java
index 800fa16bd..51743c2ba 100644
--- a/src/org/traccar/protocol/TrackboxProtocolDecoder.java
+++ b/src/org/traccar/protocol/TrackboxProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -54,7 +55,7 @@ public class TrackboxProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/TramigoProtocolDecoder.java b/src/org/traccar/protocol/TramigoProtocolDecoder.java
index 7694d1dcb..3035c8f29 100644
--- a/src/org/traccar/protocol/TramigoProtocolDecoder.java
+++ b/src/org/traccar/protocol/TramigoProtocolDecoder.java
@@ -27,7 +27,8 @@ import org.traccar.model.Position;
import java.nio.charset.Charset;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import java.util.regex.Matcher;
@@ -44,7 +45,7 @@ public class TramigoProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/TytanProtocolDecoder.java b/src/org/traccar/protocol/TytanProtocolDecoder.java
index 5296d23a0..432fa213e 100644
--- a/src/org/traccar/protocol/TytanProtocolDecoder.java
+++ b/src/org/traccar/protocol/TytanProtocolDecoder.java
@@ -17,12 +17,14 @@ package org.traccar.protocol;
import java.net.SocketAddress;
import java.nio.charset.Charset;
-import java.util.*;
-
+import java.util.Date;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.ChannelBufferTools;
import org.traccar.helper.UnitsConverter;
@@ -37,7 +39,7 @@ public class TytanProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/UlbotechProtocolDecoder.java b/src/org/traccar/protocol/UlbotechProtocolDecoder.java
index e6ccfe2c5..1de3b50b9 100644
--- a/src/org/traccar/protocol/UlbotechProtocolDecoder.java
+++ b/src/org/traccar/protocol/UlbotechProtocolDecoder.java
@@ -15,17 +15,16 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
+import java.util.Date;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.ChannelBufferTools;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
import org.traccar.model.Position;
-import java.util.Date;
-
public class UlbotechProtocolDecoder extends BaseProtocolDecoder {
public UlbotechProtocolDecoder(UlbotechProtocol protocol) {
@@ -46,7 +45,7 @@ public class UlbotechProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/V680ProtocolDecoder.java b/src/org/traccar/protocol/V680ProtocolDecoder.java
index 7fbbe400b..6b8557a5a 100644
--- a/src/org/traccar/protocol/V680ProtocolDecoder.java
+++ b/src/org/traccar/protocol/V680ProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -54,7 +55,7 @@ public class V680ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/VisiontekProtocolDecoder.java b/src/org/traccar/protocol/VisiontekProtocolDecoder.java
index abb94ea3a..49be11d6d 100644
--- a/src/org/traccar/protocol/VisiontekProtocolDecoder.java
+++ b/src/org/traccar/protocol/VisiontekProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -57,7 +58,7 @@ public class VisiontekProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/WialonProtocolDecoder.java b/src/org/traccar/protocol/WialonProtocolDecoder.java
index d85a64d31..5cf6cdab5 100644
--- a/src/org/traccar/protocol/WialonProtocolDecoder.java
+++ b/src/org/traccar/protocol/WialonProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
import java.util.TimeZone;
@@ -166,7 +167,7 @@ public class WialonProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/WondexProtocolDecoder.java b/src/org/traccar/protocol/WondexProtocolDecoder.java
index 25d58d17b..5771df043 100644
--- a/src/org/traccar/protocol/WondexProtocolDecoder.java
+++ b/src/org/traccar/protocol/WondexProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -55,7 +56,7 @@ public class WondexProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
// Parse message
diff --git a/src/org/traccar/protocol/XexunProtocolDecoder.java b/src/org/traccar/protocol/XexunProtocolDecoder.java
index 2f5628a9d..1bd155a56 100644
--- a/src/org/traccar/protocol/XexunProtocolDecoder.java
+++ b/src/org/traccar/protocol/XexunProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -66,7 +67,7 @@ public class XexunProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
// Parse message
diff --git a/src/org/traccar/protocol/XirgoProtocolDecoder.java b/src/org/traccar/protocol/XirgoProtocolDecoder.java
index a08986f71..81a3ac4c5 100644
--- a/src/org/traccar/protocol/XirgoProtocolDecoder.java
+++ b/src/org/traccar/protocol/XirgoProtocolDecoder.java
@@ -20,10 +20,7 @@ import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
@@ -56,7 +53,7 @@ public class XirgoProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Xt013ProtocolDecoder.java b/src/org/traccar/protocol/Xt013ProtocolDecoder.java
index c64869aa1..11ae14d22 100644
--- a/src/org/traccar/protocol/Xt013ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Xt013ProtocolDecoder.java
@@ -23,7 +23,8 @@ import org.traccar.model.Event;
import org.traccar.model.Position;
import java.text.ParseException;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -59,7 +60,7 @@ public class Xt013ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
// Parse message
diff --git a/src/org/traccar/protocol/Xt7ProtocolDecoder.java b/src/org/traccar/protocol/Xt7ProtocolDecoder.java
index d6f82e453..1e7ab0aac 100644
--- a/src/org/traccar/protocol/Xt7ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Xt7ProtocolDecoder.java
@@ -16,7 +16,8 @@
package org.traccar.protocol;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -58,7 +59,7 @@ public class Xt7ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/YwtProtocolDecoder.java b/src/org/traccar/protocol/YwtProtocolDecoder.java
index c0b814349..67ea13817 100644
--- a/src/org/traccar/protocol/YwtProtocolDecoder.java
+++ b/src/org/traccar/protocol/YwtProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -53,7 +54,7 @@ public class YwtProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;