diff options
author | anton2920 <anton2920@gmail.com> | 2022-09-04 14:21:12 +0100 |
---|---|---|
committer | anton2920 <anton2920@gmail.com> | 2022-09-07 09:48:46 +0100 |
commit | 210e2cd641bf89d9b86d247a237739d026208bcf (patch) | |
tree | 330a9324cf5e2bd3fc7eb6ac8da326a98085713b /src/main/java/org/traccar/protocol/G1rusProtocol.java | |
parent | 3ae99730940f0f108a0c655f0cb52c109ca57885 (diff) | |
download | trackermap-server-210e2cd641bf89d9b86d247a237739d026208bcf.tar.gz trackermap-server-210e2cd641bf89d9b86d247a237739d026208bcf.tar.bz2 trackermap-server-210e2cd641bf89d9b86d247a237739d026208bcf.zip |
Added files for G1rus protocol
Diffstat (limited to 'src/main/java/org/traccar/protocol/G1rusProtocol.java')
-rw-r--r-- | src/main/java/org/traccar/protocol/G1rusProtocol.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/G1rusProtocol.java b/src/main/java/org/traccar/protocol/G1rusProtocol.java new file mode 100644 index 000000000..0d77a8add --- /dev/null +++ b/src/main/java/org/traccar/protocol/G1rusProtocol.java @@ -0,0 +1,24 @@ +package org.traccar.protocol; + +import io.netty.handler.codec.string.StringDecoder; +import io.netty.handler.codec.string.StringEncoder; +import org.traccar.BaseProtocol; +import org.traccar.PipelineBuilder; +import org.traccar.TrackerServer; +import org.traccar.config.Config; + +import javax.inject.Inject; + +public class G1rusProtocol extends BaseProtocol { + + @Inject + public G1rusProtocol(Config config) { + addServer(new TrackerServer(config, getName(), false) { + @Override + protected void addProtocolHandlers(PipelineBuilder pipeline, Config config) { + pipeline.addLast(new StringEncoder()); + pipeline.addLast(new G1rusProtocolDecoder(G1rusProtocol.this)); + } + }); + } +} |