aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-12-28 23:09:40 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2022-01-14 21:01:16 -0800
commitc1121777969fc5f183e325ad672b581cbe881895 (patch)
tree8d874f0244ceb68c7bc9f440f44b20cca882fdad /src/main/java/org/traccar/BasePipelineFactory.java
parent839751e76e329adb573150644bd6198beba0d3b6 (diff)
downloadtrackermap-server-c1121777969fc5f183e325ad672b581cbe881895.tar.gz
trackermap-server-c1121777969fc5f183e325ad672b581cbe881895.tar.bz2
trackermap-server-c1121777969fc5f183e325ad672b581cbe881895.zip
Extract connector interface
Diffstat (limited to 'src/main/java/org/traccar/BasePipelineFactory.java')
-rw-r--r--src/main/java/org/traccar/BasePipelineFactory.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/org/traccar/BasePipelineFactory.java b/src/main/java/org/traccar/BasePipelineFactory.java
index c9f3a2346..88a1bc713 100644
--- a/src/main/java/org/traccar/BasePipelineFactory.java
+++ b/src/main/java/org/traccar/BasePipelineFactory.java
@@ -54,12 +54,12 @@ import java.util.Map;
public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
- private final TrackerServer server;
+ private final TrackerConnector connector;
private final String protocol;
private int timeout;
- public BasePipelineFactory(TrackerServer server, String protocol) {
- this.server = server;
+ public BasePipelineFactory(TrackerConnector connector, String protocol) {
+ this.connector = connector;
this.protocol = protocol;
timeout = Context.getConfig().getInteger(Keys.PROTOCOL_TIMEOUT.withPrefix(protocol));
if (timeout == 0) {
@@ -97,10 +97,10 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
protected void initChannel(Channel channel) {
final ChannelPipeline pipeline = channel.pipeline();
- if (timeout > 0 && !server.isDatagram()) {
+ if (timeout > 0 && !connector.isDatagram()) {
pipeline.addLast(new IdleStateHandler(timeout, 0, 0));
}
- pipeline.addLast(new OpenChannelHandler(server));
+ pipeline.addLast(new OpenChannelHandler(connector));
pipeline.addLast(new NetworkMessageHandler());
pipeline.addLast(new StandardLoggingHandler(protocol));