Search in sources :

Example 16 with LengthFieldBasedFrameDecoder

use of org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder in project traccar by tananaev.

the class DmtProtocol method initTrackerServers.

@Override
public void initTrackerServers(List<TrackerServer> serverList) {
    TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {

        @Override
        protected void addSpecificHandlers(ChannelPipeline pipeline) {
            pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 3, 2));
            pipeline.addLast("objectDecoder", new DmtProtocolDecoder(DmtProtocol.this));
        }
    };
    server.setEndianness(ByteOrder.LITTLE_ENDIAN);
    serverList.add(server);
}
Also used : TrackerServer(org.traccar.TrackerServer) LengthFieldBasedFrameDecoder(org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder) ServerBootstrap(org.jboss.netty.bootstrap.ServerBootstrap) ChannelPipeline(org.jboss.netty.channel.ChannelPipeline)

Example 17 with LengthFieldBasedFrameDecoder

use of org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder in project traccar by tananaev.

the class GatorProtocol method initTrackerServers.

@Override
public void initTrackerServers(List<TrackerServer> serverList) {
    serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {

        @Override
        protected void addSpecificHandlers(ChannelPipeline pipeline) {
            pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 3, 2));
            pipeline.addLast("objectDecoder", new GatorProtocolDecoder(GatorProtocol.this));
        }
    });
    serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {

        @Override
        protected void addSpecificHandlers(ChannelPipeline pipeline) {
            pipeline.addLast("objectDecoder", new GatorProtocolDecoder(GatorProtocol.this));
        }
    });
}
Also used : TrackerServer(org.traccar.TrackerServer) LengthFieldBasedFrameDecoder(org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder) ServerBootstrap(org.jboss.netty.bootstrap.ServerBootstrap) ChannelPipeline(org.jboss.netty.channel.ChannelPipeline) ConnectionlessBootstrap(org.jboss.netty.bootstrap.ConnectionlessBootstrap)

Example 18 with LengthFieldBasedFrameDecoder

use of org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder in project traccar by tananaev.

the class ApelProtocol method initTrackerServers.

@Override
public void initTrackerServers(List<TrackerServer> serverList) {
    TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {

        @Override
        protected void addSpecificHandlers(ChannelPipeline pipeline) {
            pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 2, 2, 4, 0));
            pipeline.addLast("objectDecoder", new ApelProtocolDecoder(ApelProtocol.this));
        }
    };
    server.setEndianness(ByteOrder.LITTLE_ENDIAN);
    serverList.add(server);
}
Also used : TrackerServer(org.traccar.TrackerServer) LengthFieldBasedFrameDecoder(org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder) ServerBootstrap(org.jboss.netty.bootstrap.ServerBootstrap) ChannelPipeline(org.jboss.netty.channel.ChannelPipeline)

Example 19 with LengthFieldBasedFrameDecoder

use of org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder in project traccar by tananaev.

the class AstraProtocol method initTrackerServers.

@Override
public void initTrackerServers(List<TrackerServer> serverList) {
    serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {

        @Override
        protected void addSpecificHandlers(ChannelPipeline pipeline) {
            pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 1, 2, -3, 0));
            pipeline.addLast("objectDecoder", new AstraProtocolDecoder(AstraProtocol.this));
        }
    });
    serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {

        @Override
        protected void addSpecificHandlers(ChannelPipeline pipeline) {
            pipeline.addLast("objectDecoder", new AstraProtocolDecoder(AstraProtocol.this));
        }
    });
}
Also used : TrackerServer(org.traccar.TrackerServer) LengthFieldBasedFrameDecoder(org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder) ServerBootstrap(org.jboss.netty.bootstrap.ServerBootstrap) ChannelPipeline(org.jboss.netty.channel.ChannelPipeline) ConnectionlessBootstrap(org.jboss.netty.bootstrap.ConnectionlessBootstrap)

Example 20 with LengthFieldBasedFrameDecoder

use of org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder in project traccar by traccar.

the class ProgressProtocol method initTrackerServers.

@Override
public void initTrackerServers(List<TrackerServer> serverList) {
    TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {

        @Override
        protected void addSpecificHandlers(ChannelPipeline pipeline) {
            pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 2, 2, 4, 0));
            pipeline.addLast("objectDecoder", new ProgressProtocolDecoder(ProgressProtocol.this));
        }
    };
    server.setEndianness(ByteOrder.LITTLE_ENDIAN);
    serverList.add(server);
}
Also used : TrackerServer(org.traccar.TrackerServer) LengthFieldBasedFrameDecoder(org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder) ServerBootstrap(org.jboss.netty.bootstrap.ServerBootstrap) ChannelPipeline(org.jboss.netty.channel.ChannelPipeline)

Aggregations

LengthFieldBasedFrameDecoder (org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder)26 ChannelPipeline (org.jboss.netty.channel.ChannelPipeline)24 ServerBootstrap (org.jboss.netty.bootstrap.ServerBootstrap)22 TrackerServer (org.traccar.TrackerServer)22 ConnectionlessBootstrap (org.jboss.netty.bootstrap.ConnectionlessBootstrap)8 ZlibDecoder (org.jboss.netty.handler.codec.compression.ZlibDecoder)2 LengthFieldPrepender (org.jboss.netty.handler.codec.frame.LengthFieldPrepender)2 ProtobufDecoder (org.jboss.netty.handler.codec.protobuf.ProtobufDecoder)2 ProtobufEncoder (org.jboss.netty.handler.codec.protobuf.ProtobufEncoder)2 ProtobufVarint32FrameDecoder (org.jboss.netty.handler.codec.protobuf.ProtobufVarint32FrameDecoder)2 ProtobufVarint32LengthFieldPrepender (org.jboss.netty.handler.codec.protobuf.ProtobufVarint32LengthFieldPrepender)2 StringEncoder (org.jboss.netty.handler.codec.string.StringEncoder)2 ClientHandshakeHandler (org.terasology.network.internal.ClientHandshakeHandler)2 JoinStatusImpl (org.terasology.network.internal.JoinStatusImpl)2 MetricRecordingHandler (org.terasology.network.internal.MetricRecordingHandler)2 ClientConnectionHandler (org.terasology.network.internal.ClientConnectionHandler)1 ClientHandler (org.terasology.network.internal.ClientHandler)1 ServerInfoRequestHandler (org.terasology.network.internal.ServerInfoRequestHandler)1