aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-03-26 20:46:45 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-03-26 20:46:45 +1300
commitb83870c88c50c532c068eed92fff8f7ef8cf5ffa (patch)
tree26a6bfb8f6b1020607f43f06ca8dd5478e45f612
parentd57d87e6c4f8142fca1b2f173ad5818e92a5c277 (diff)
downloadtrackermap-server-b83870c88c50c532c068eed92fff8f7ef8cf5ffa.tar.gz
trackermap-server-b83870c88c50c532c068eed92fff8f7ef8cf5ffa.tar.bz2
trackermap-server-b83870c88c50c532c068eed92fff8f7ef8cf5ffa.zip
Add UDP support for Wondex protocol
-rw-r--r--src/org/traccar/protocol/WondexProtocol.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/WondexProtocol.java b/src/org/traccar/protocol/WondexProtocol.java
index 169c6cb43..b07f84909 100644
--- a/src/org/traccar/protocol/WondexProtocol.java
+++ b/src/org/traccar/protocol/WondexProtocol.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.string.StringDecoder;
@@ -39,6 +40,13 @@ public class WondexProtocol extends BaseProtocol {
pipeline.addLast("objectDecoder", new WondexProtocolDecoder(WondexProtocol.this));
}
});
+ serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("stringDecoder", new StringDecoder());
+ pipeline.addLast("objectDecoder", new WondexProtocolDecoder(WondexProtocol.this));
+ }
+ });
}
}