aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-03-18 22:47:15 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-03-18 22:47:15 +1300
commitd4f33f724b82154e3dd6f8fb8546cbc37b164ba5 (patch)
tree44dd18b5b9903e8623f55891c75eaec52d8cf07b /src/org/traccar/ServerManager.java
parent91436e6a790b6c01c7af7d6c73c8783896c6cd87 (diff)
downloadtrackermap-server-d4f33f724b82154e3dd6f8fb8546cbc37b164ba5.tar.gz
trackermap-server-d4f33f724b82154e3dd6f8fb8546cbc37b164ba5.tar.bz2
trackermap-server-d4f33f724b82154e3dd6f8fb8546cbc37b164ba5.zip
Add Cellocator protocol
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r--src/org/traccar/ServerManager.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index bf6e7afca..39e6a8330 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -138,6 +138,7 @@ public class ServerManager {
initTlt2hServer("tlt2h");
initSyrusServer("syrus");
initVt300Server("vt300");
+ initCellocatorServer("cellocator");
// Initialize web server
if (Boolean.valueOf(properties.getProperty("http.enable"))) {
@@ -717,4 +718,18 @@ public class ServerManager {
}
}
+ private void initCellocatorServer(String protocol) throws SQLException {
+ if (isProtocolEnabled(properties, protocol)) {
+ TrackerServer server = new TrackerServer(this, new ServerBootstrap(), protocol) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("frameDecoder", new CellocatorFrameDecoder());
+ pipeline.addLast("objectDecoder", new CellocatorProtocolDecoder(ServerManager.this));
+ }
+ };
+ server.setEndianness(ByteOrder.LITTLE_ENDIAN);
+ serverList.add(server);
+ }
+ }
+
}