diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-02-25 16:26:32 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-02-25 16:26:32 +1300 |
commit | 4e1c651633ba76f388e856cc025416a5d5c7ec9f (patch) | |
tree | 149f3d22adea974e974f185adf82532d52ce2d3d | |
parent | fddcc3fd41423720ab5034ec527af8086e301e0a (diff) | |
download | trackermap-server-4e1c651633ba76f388e856cc025416a5d5c7ec9f.tar.gz trackermap-server-4e1c651633ba76f388e856cc025416a5d5c7ec9f.tar.bz2 trackermap-server-4e1c651633ba76f388e856cc025416a5d5c7ec9f.zip |
Enable UDP protocol for Teltonika
-rw-r--r-- | src/org/traccar/protocol/TeltonikaProtocol.java | 9 |
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)); + } + }); } } |