aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/CellocatorProtocol.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/CellocatorProtocol.java')
-rw-r--r--src/org/traccar/protocol/CellocatorProtocol.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/CellocatorProtocol.java b/src/org/traccar/protocol/CellocatorProtocol.java
index 22564d44f..e5f6ac8f6 100644
--- a/src/org/traccar/protocol/CellocatorProtocol.java
+++ b/src/org/traccar/protocol/CellocatorProtocol.java
@@ -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.traccar.BaseProtocol;
@@ -31,7 +32,7 @@ public class CellocatorProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new CellocatorFrameDecoder());
@@ -40,6 +41,15 @@ public class CellocatorProtocol extends BaseProtocol {
};
server.setEndianness(ByteOrder.LITTLE_ENDIAN);
serverList.add(server);
+
+ server = new TrackerServer(new ConnectionlessBootstrap(), getName()) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("objectDecoder", new CellocatorProtocolDecoder(CellocatorProtocol.this));
+ }
+ };
+ server.setEndianness(ByteOrder.LITTLE_ENDIAN);
+ serverList.add(server);
}
}