From 504277e7a77bdf27b1bed31f585ef01dace1a3a5 Mon Sep 17 00:00:00 2001 From: michaelloliveira Date: Mon, 4 Jun 2018 11:29:20 -0300 Subject: Modified structure for using Patterns. --- src/org/traccar/protocol/SviasProtocol.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/org/traccar/protocol/SviasProtocol.java b/src/org/traccar/protocol/SviasProtocol.java index b58872baf..8a45f43cb 100644 --- a/src/org/traccar/protocol/SviasProtocol.java +++ b/src/org/traccar/protocol/SviasProtocol.java @@ -21,10 +21,9 @@ import org.jboss.netty.handler.codec.string.StringDecoder; import org.jboss.netty.handler.codec.string.StringEncoder; import org.traccar.BaseProtocol; import org.traccar.TrackerServer; -import org.traccar.model.Command; import java.util.List; -import org.jboss.netty.bootstrap.ConnectionlessBootstrap; +import org.traccar.model.Command; public class SviasProtocol extends BaseProtocol { @@ -41,7 +40,7 @@ public class SviasProtocol extends BaseProtocol { Command.TYPE_ALARM_REMOVE); } - @Override + @Override public void initTrackerServers(List serverList) { serverList.add(new TrackerServer(new ServerBootstrap(), getName()) { @Override @@ -52,15 +51,6 @@ public class SviasProtocol extends BaseProtocol { pipeline.addLast("objectDecoder", new SviasProtocolDecoder(SviasProtocol.this)); } }); - serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) { - @Override - protected void addSpecificHandlers(ChannelPipeline pipeline) { - pipeline.addLast("stringEncoder", new StringEncoder()); - pipeline.addLast("stringDecoder", new StringDecoder()); - pipeline.addLast("objectEncoder", new SviasProtocolEncoder()); - pipeline.addLast("objectDecoder", new SviasProtocolDecoder(SviasProtocol.this)); - } - }); } } -- cgit v1.2.3