package com.ifpdos.autotest.k0.d;

import android.util.Log;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;

/* JADX INFO: compiled from: ClientControlHandler.java */
/* JADX INFO: loaded from: classes.dex */
public class a extends ChannelInboundHandlerAdapter {

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    private com.ifpdos.autotest.m0.a f2025c;

    public a(com.ifpdos.autotest.m0.a aVar) {
        this.f2025c = aVar;
    }

    @Override // io.netty.channel.ChannelInboundHandlerAdapter, io.netty.channel.ChannelInboundHandler
    public void channelActive(ChannelHandlerContext channelHandlerContext) {
        Log.v("ClientControlHandler", channelHandlerContext.channel().id() + "已连接到TestServer");
        if (this.f2025c.a(channelHandlerContext)) {
            this.f2025c.c(channelHandlerContext);
        } else {
            channelHandlerContext.disconnect();
        }
    }

    @Override // io.netty.channel.ChannelInboundHandlerAdapter, io.netty.channel.ChannelInboundHandler
    public void channelInactive(ChannelHandlerContext channelHandlerContext) {
        Log.v("ClientControlHandler", channelHandlerContext.channel().id() + "断开连接");
        this.f2025c.d(channelHandlerContext);
    }
}
