aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/BasePipelineFactory.java')
-rw-r--r--src/main/java/org/traccar/BasePipelineFactory.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/BasePipelineFactory.java b/src/main/java/org/traccar/BasePipelineFactory.java
index d50852649..89ef76a80 100644
--- a/src/main/java/org/traccar/BasePipelineFactory.java
+++ b/src/main/java/org/traccar/BasePipelineFactory.java
@@ -67,6 +67,8 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
}
}
+ protected abstract void addTransportHandlers(PipelineBuilder pipeline);
+
protected abstract void addProtocolHandlers(PipelineBuilder pipeline);
@SafeVarargs
@@ -97,6 +99,8 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
protected void initChannel(Channel channel) {
final ChannelPipeline pipeline = channel.pipeline();
+ addTransportHandlers(pipeline::addLast);
+
if (timeout > 0 && !connector.isDatagram()) {
pipeline.addLast(new IdleStateHandler(timeout, 0, 0));
}