diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-06-18 22:15:55 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-06-18 22:15:55 +1200 |
commit | 627aaff1b036a5a7b3dbc204726ba9f446beb1d3 (patch) | |
tree | 9df3e328f81d14cfd9291d546ada9ac367e2ae2e /src/org/traccar/ServerManager.java | |
parent | 04cb08b983f2c408195c01e34ea4b6d3df5cda95 (diff) | |
download | trackermap-server-627aaff1b036a5a7b3dbc204726ba9f446beb1d3.tar.gz trackermap-server-627aaff1b036a5a7b3dbc204726ba9f446beb1d3.tar.bz2 trackermap-server-627aaff1b036a5a7b3dbc204726ba9f446beb1d3.zip |
Start Atrack decoder
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r-- | src/org/traccar/ServerManager.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java index afb6fa60a..55e4e4eeb 100644 --- a/src/org/traccar/ServerManager.java +++ b/src/org/traccar/ServerManager.java @@ -150,6 +150,7 @@ public class ServerManager { initApelServer("apel"); initManPowerServer("manpower"); initGlobalSatServer("globalsat"); + initAtrackServer("atrack"); // Initialize web server if (Boolean.valueOf(properties.getProperty("http.enable"))) { @@ -891,4 +892,16 @@ public class ServerManager { } } + private void initAtrackServer(String protocol) throws SQLException { + if (isProtocolEnabled(properties, protocol)) { + serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) { + @Override + protected void addSpecificHandlers(ChannelPipeline pipeline) { + pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 4, 2, 6, 0)); + pipeline.addLast("objectDecoder", new AtrackProtocolDecoder(ServerManager.this)); + } + }); + } + } + } |