aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/TeltonikaProtocol.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-02-25 16:26:32 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-02-25 16:26:32 +1300
commit4e1c651633ba76f388e856cc025416a5d5c7ec9f (patch)
tree149f3d22adea974e974f185adf82532d52ce2d3d /src/org/traccar/protocol/TeltonikaProtocol.java
parentfddcc3fd41423720ab5034ec527af8086e301e0a (diff)
downloadtrackermap-server-4e1c651633ba76f388e856cc025416a5d5c7ec9f.tar.gz
trackermap-server-4e1c651633ba76f388e856cc025416a5d5c7ec9f.tar.bz2
trackermap-server-4e1c651633ba76f388e856cc025416a5d5c7ec9f.zip
Enable UDP protocol for Teltonika
Diffstat (limited to 'src/org/traccar/protocol/TeltonikaProtocol.java')
-rw-r--r--src/org/traccar/protocol/TeltonikaProtocol.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/TeltonikaProtocol.java b/src/org/traccar/protocol/TeltonikaProtocol.java
index 859b2a08c..f944c3003 100644
--- a/src/org/traccar/protocol/TeltonikaProtocol.java
+++ b/src/org/traccar/protocol/TeltonikaProtocol.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2015 - 2016 Anton Tananaev (anton.tananaev@gmail.com)
*
* 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.traccar.BaseProtocol;
@@ -37,6 +38,12 @@ public class TeltonikaProtocol extends BaseProtocol {
pipeline.addLast("objectDecoder", new TeltonikaProtocolDecoder(TeltonikaProtocol.this));
}
});
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("objectDecoder", new TeltonikaProtocolDecoder(TeltonikaProtocol.this));
+ }
+ });
}
}