aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/TrackerServer.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-03-19 23:12:50 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2014-03-19 23:12:50 +1300
commit57a7b6beaade9a51690d0cc89149eca0dea8294a (patch)
tree341d468c1c0ec30fc6206cc382f67f2cf6a185c9 /src/org/traccar/TrackerServer.java
parent289609b483d0b6188f8536f692363eb91e38288c (diff)
downloadtrackermap-server-57a7b6beaade9a51690d0cc89149eca0dea8294a.tar.gz
trackermap-server-57a7b6beaade9a51690d0cc89149eca0dea8294a.tar.bz2
trackermap-server-57a7b6beaade9a51690d0cc89149eca0dea8294a.zip
Fix Noran decoder (fix #610)
Diffstat (limited to 'src/org/traccar/TrackerServer.java')
-rw-r--r--src/org/traccar/TrackerServer.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/org/traccar/TrackerServer.java b/src/org/traccar/TrackerServer.java
index 1b3677836..9fcc2f5b6 100644
--- a/src/org/traccar/TrackerServer.java
+++ b/src/org/traccar/TrackerServer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 - 2013 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2012 - 2014 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.
@@ -33,9 +33,9 @@ import org.jboss.netty.channel.group.DefaultChannelGroup;
*/
public abstract class TrackerServer {
- private ServerManager serverManager;
- private Bootstrap bootstrap;
- private String protocol;
+ private final ServerManager serverManager;
+ private final Bootstrap bootstrap;
+ private final String protocol;
public String getProtocol() {
return protocol;
@@ -97,13 +97,14 @@ public abstract class TrackerServer {
* Set endianness
*/
void setEndianness(ByteOrder byteOrder) {
+ bootstrap.setOption("bufferFactory", new HeapChannelBufferFactory(byteOrder));
bootstrap.setOption("child.bufferFactory", new HeapChannelBufferFactory(byteOrder));
}
/**
* Opened channels
*/
- private ChannelGroup allChannels = new DefaultChannelGroup();
+ private final ChannelGroup allChannels = new DefaultChannelGroup();
public ChannelGroup getChannelGroup() {
return allChannels;