diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-04-01 14:31:21 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-04-01 14:31:21 +1300 |
commit | db0ba9badfca80b51acd50a83b8ee7abd5d31522 (patch) | |
tree | a70070d9650959cb3f2ae39a9c2aff895ecc3aed /src/org/traccar/protocol/T55Protocol.java | |
parent | eb5fbb9f8ba1a798949e2b881b8268ff151aaeb6 (diff) | |
download | trackermap-server-db0ba9badfca80b51acd50a83b8ee7abd5d31522.tar.gz trackermap-server-db0ba9badfca80b51acd50a83b8ee7abd5d31522.tar.bz2 trackermap-server-db0ba9badfca80b51acd50a83b8ee7abd5d31522.zip |
Add support for OpenGTS format (fix #1836)
Diffstat (limited to 'src/org/traccar/protocol/T55Protocol.java')
-rw-r--r-- | src/org/traccar/protocol/T55Protocol.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/T55Protocol.java b/src/org/traccar/protocol/T55Protocol.java index 041413a65..3fa0f6a9e 100644 --- a/src/org/traccar/protocol/T55Protocol.java +++ b/src/org/traccar/protocol/T55Protocol.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.jboss.netty.handler.codec.frame.LineBasedFrameDecoder; @@ -42,6 +43,14 @@ public class T55Protocol extends BaseProtocol { pipeline.addLast("objectDecoder", new T55ProtocolDecoder(T55Protocol.this)); } }); + serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) { + @Override + protected void addSpecificHandlers(ChannelPipeline pipeline) { + pipeline.addLast("stringEncoder", new StringEncoder()); + pipeline.addLast("stringDecoder", new StringDecoder()); + pipeline.addLast("objectDecoder", new T55ProtocolDecoder(T55Protocol.this)); + } + }); } } |