aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/EelinkProtocol.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-11-27 22:56:22 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-11-27 22:56:22 +1300
commitb149a7b71283f1a8481c9e3954d636afcff6169e (patch)
treec0682f9493518cb096bfe2e7f609513566c523ff /src/org/traccar/protocol/EelinkProtocol.java
parent4f772b76b08d7515cf27c7bfda819612aeea26f9 (diff)
downloadtrackermap-server-b149a7b71283f1a8481c9e3954d636afcff6169e.tar.gz
trackermap-server-b149a7b71283f1a8481c9e3954d636afcff6169e.tar.bz2
trackermap-server-b149a7b71283f1a8481c9e3954d636afcff6169e.zip
Support eeLink UDP format
Diffstat (limited to 'src/org/traccar/protocol/EelinkProtocol.java')
-rw-r--r--src/org/traccar/protocol/EelinkProtocol.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/EelinkProtocol.java b/src/org/traccar/protocol/EelinkProtocol.java
index 5499094d9..3c3424cd4 100644
--- a/src/org/traccar/protocol/EelinkProtocol.java
+++ b/src/org/traccar/protocol/EelinkProtocol.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 - 2016 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2017 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,6 +15,7 @@
*/
package org.traccar.protocol;
+import org.jboss.netty.bootstrap.ConnectionlessBootstrap;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder;
@@ -45,6 +46,13 @@ public class EelinkProtocol extends BaseProtocol {
pipeline.addLast("objectDecoder", new EelinkProtocolDecoder(EelinkProtocol.this));
}
});
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("objectEncoder", new EelinkProtocolEncoder());
+ pipeline.addLast("objectDecoder", new EelinkProtocolDecoder(EelinkProtocol.this));
+ }
+ });
}
}