use of org.traccar.TrackerServer in project traccar by tananaev.
the class RecodaProtocol 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, 4, 4, -8, 0));
pipeline.addLast("objectDecoder", new RecodaProtocolDecoder(RecodaProtocol.this));
}
};
server.setEndianness(ByteOrder.LITTLE_ENDIAN);
serverList.add(server);
}
use of org.traccar.TrackerServer in project traccar by tananaev.
the class RitiProtocol 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, 105, 2, 3, 0));
pipeline.addLast("objectDecoder", new RitiProtocolDecoder(RitiProtocol.this));
}
};
server.setEndianness(ByteOrder.LITTLE_ENDIAN);
serverList.add(server);
}
use of org.traccar.TrackerServer in project traccar by tananaev.
the class XirgoProtocol 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 CharacterDelimiterFrameDecoder(1024, "##"));
pipeline.addLast("stringEncoder", new StringEncoder());
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("objectEncoder", new XirgoProtocolEncoder());
pipeline.addLast("objectDecoder", new XirgoProtocolDecoder(XirgoProtocol.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 XirgoProtocolEncoder());
pipeline.addLast("objectDecoder", new XirgoProtocolDecoder(XirgoProtocol.this));
}
});
}
use of org.traccar.TrackerServer in project traccar by tananaev.
the class WondexProtocol 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 WondexFrameDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
pipeline.addLast("objectEncoder", new WondexProtocolEncoder());
pipeline.addLast("objectDecoder", new WondexProtocolDecoder(WondexProtocol.this));
}
});
serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("stringEncoder", new StringEncoder());
pipeline.addLast("objectEncoder", new WondexProtocolEncoder());
pipeline.addLast("objectDecoder", new WondexProtocolDecoder(WondexProtocol.this));
}
});
}
use of org.traccar.TrackerServer in project traccar by tananaev.
the class MeitrackProtocol 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 MeitrackFrameDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
pipeline.addLast("objectEncoder", new MeitrackProtocolEncoder());
pipeline.addLast("objectDecoder", new MeitrackProtocolDecoder(MeitrackProtocol.this));
}
};
server.setEndianness(ByteOrder.LITTLE_ENDIAN);
serverList.add(server);
server = new TrackerServer(new ConnectionlessBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("stringEncoder", new StringEncoder());
pipeline.addLast("objectEncoder", new MeitrackProtocolEncoder());
pipeline.addLast("objectDecoder", new MeitrackProtocolDecoder(MeitrackProtocol.this));
}
};
server.setEndianness(ByteOrder.LITTLE_ENDIAN);
serverList.add(server);
}
Aggregations