blob: 0d77a8adda64f8fd27e1fc6fdac7a37eb082e2ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
package org.traccar.protocol;
import io.netty.handler.codec.string.StringDecoder;
import io.netty.handler.codec.string.StringEncoder;
import org.traccar.BaseProtocol;
import org.traccar.PipelineBuilder;
import org.traccar.TrackerServer;
import org.traccar.config.Config;
import javax.inject.Inject;
public class G1rusProtocol extends BaseProtocol {
@Inject
public G1rusProtocol(Config config) {
addServer(new TrackerServer(config, getName(), false) {
@Override
protected void addProtocolHandlers(PipelineBuilder pipeline, Config config) {
pipeline.addLast(new StringEncoder());
pipeline.addLast(new G1rusProtocolDecoder(G1rusProtocol.this));
}
});
}
}
|