aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/AuroProtocol.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-01-07 09:30:38 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-01-07 09:30:38 +1300
commit4bd9a1afc970159323a7535d3ed004b499e0fbc3 (patch)
treefabb920703c88e78e61ce11dcc5b9dc66903fe46 /src/org/traccar/protocol/AuroProtocol.java
parentf1282f639721c46a7b2abb653366f909f6703c63 (diff)
downloadtrackermap-server-4bd9a1afc970159323a7535d3ed004b499e0fbc3.tar.gz
trackermap-server-4bd9a1afc970159323a7535d3ed004b499e0fbc3.tar.bz2
trackermap-server-4bd9a1afc970159323a7535d3ed004b499e0fbc3.zip
Rename protocol from auru to auro
Diffstat (limited to 'src/org/traccar/protocol/AuroProtocol.java')
-rw-r--r--src/org/traccar/protocol/AuroProtocol.java45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/AuroProtocol.java b/src/org/traccar/protocol/AuroProtocol.java
new file mode 100644
index 000000000..cada65f72
--- /dev/null
+++ b/src/org/traccar/protocol/AuroProtocol.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2015 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.traccar.protocol;
+
+import org.jboss.netty.bootstrap.ServerBootstrap;
+import org.jboss.netty.channel.ChannelPipeline;
+import org.jboss.netty.handler.codec.frame.LineBasedFrameDecoder;
+import org.jboss.netty.handler.codec.string.StringDecoder;
+import org.traccar.BaseProtocol;
+import org.traccar.TrackerServer;
+
+import java.util.List;
+
+public class AuroProtocol extends BaseProtocol {
+
+ public AuroProtocol() {
+ super("auro");
+ }
+
+ @Override
+ public void initTrackerServers(List<TrackerServer> serverList) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
+ pipeline.addLast("stringDecoder", new StringDecoder());
+ pipeline.addLast("objectDecoder", new AuroProtocolDecoder(AuroProtocol.this));
+ }
+ });
+ }
+
+}