test_class.declarator: ctx = mock(ChannelHandlerContext.class)
test_class.modifier: private final
test_class.original_string: private final ChannelHandlerContext ctx = mock(ChannelHandlerContext.class);
test_class.type: ChannelHandlerContext
test_class.var_name: ctx
test_class.declarator: idleStateEvent = mock(IdleStateEvent.class)
test_class.modifier: private final
test_class.original_string: private final IdleStateEvent idleStateEvent = mock(IdleStateEvent.class);
test_class.type: IdleStateEvent
test_class.var_name: idleStateEvent
test_class.declarator: MAX_READ_IDLE_BEFORE_CLOSE = PropertyManager
        .getIntProperty("channel.read.idle.max", 3)
test_class.modifier: private static final
test_class.original_string: private static final int MAX_READ_IDLE_BEFORE_CLOSE = PropertyManager
        .getIntProperty("channel.read.idle.max", 3);
test_class.type: int
test_class.var_name: MAX_READ_IDLE_BEFORE_CLOSE
test_class.file: ovsdb-client/src/test/java/com/vmware/ovsdb/netty/OvsdbConnectionHandlerTest.java
test_class.identifier: OvsdbConnectionHandlerTest
test_case.body: @Test
    public void testReadRegularEvent() {
      OvsdbConnectionHandler heartBeatHandler = newOvsdbConnectionHandler();
      Object userEvent = new Object();
      heartBeatHandler.userEventTriggered(ctx, userEvent);
  
      verify(ctx).fireUserEventTriggered(userEvent);
    }
test_case.class_method_signature: OvsdbConnectionHandlerTest.testReadRegularEvent()
test_case.full_signature: @Test public void testReadRegularEvent()
test_case.identifier: testReadRegularEvent
test_case.invocations: newOvsdbConnectionHandler userEventTriggered fireUserEventTriggered verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testReadRegularEvent()
focal_class.declarator: LOGGER = LoggerFactory
        .getLogger(MethodHandles.lookup().lookupClass())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory
        .getLogger(MethodHandles.lookup().lookupClass());
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: MAX_READ_IDLE_BEFORE_CLOSE = PropertyManager
        .getIntProperty("channel.read.idle.max", 3)
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_READ_IDLE_BEFORE_CLOSE = PropertyManager
        .getIntProperty("channel.read.idle.max", 3);
focal_class.type: int
focal_class.var_name: MAX_READ_IDLE_BEFORE_CLOSE
focal_class.declarator: HEARTBEAT_PREFIX = "heartbeat-"
focal_class.modifier: private static final
focal_class.original_string: private static final String HEARTBEAT_PREFIX = "heartbeat-";
focal_class.type: String
focal_class.var_name: HEARTBEAT_PREFIX
focal_class.declarator: heartbeatCount = 0
focal_class.modifier: private
focal_class.original_string: private int heartbeatCount = 0;
focal_class.type: int
focal_class.var_name: heartbeatCount
focal_class.declarator: readIdleCount = 0
focal_class.modifier: private
focal_class.original_string: private int readIdleCount = 0;
focal_class.type: int
focal_class.var_name: readIdleCount
focal_class.declarator: connectionCallback
focal_class.modifier: private final
focal_class.original_string: private final ConnectionCallback connectionCallback;
focal_class.type: ConnectionCallback
focal_class.var_name: connectionCallback
focal_class.declarator: ovsdbClientFuture
focal_class.modifier: private final
focal_class.original_string: private final CompletableFuture<OvsdbClient> ovsdbClientFuture;
focal_class.type: CompletableFuture<OvsdbClient>
focal_class.var_name: ovsdbClientFuture
focal_class.declarator: executorService
focal_class.modifier: private final
focal_class.original_string: private final ScheduledExecutorService executorService;
focal_class.type: ScheduledExecutorService
focal_class.var_name: executorService
focal_class.declarator: ovsdbClient
focal_class.modifier: private
focal_class.original_string: private OvsdbClient ovsdbClient;
focal_class.type: OvsdbClient
focal_class.var_name: ovsdbClient
focal_class.file: ovsdb-client/src/main/java/com/vmware/ovsdb/netty/OvsdbConnectionHandler.java
focal_class.identifier: OvsdbConnectionHandler
focal_class.class_method_signature: OvsdbConnectionHandler.OvsdbConnectionHandler(
        ConnectionCallback connectionCallback, ScheduledExecutorService executorService
    )
focal_class.full_signature:   OvsdbConnectionHandler(
        ConnectionCallback connectionCallback, ScheduledExecutorService executorService
    )
focal_class.identifier: OvsdbConnectionHandler
focal_class.parameters: (
        ConnectionCallback connectionCallback, ScheduledExecutorService executorService
    )
focal_class.signature:  OvsdbConnectionHandler(
        ConnectionCallback connectionCallback, ScheduledExecutorService executorService
    )
focal_class.class_method_signature: OvsdbConnectionHandler.OvsdbConnectionHandler(
        CompletableFuture<OvsdbClient> ovsdbClientFuture, ScheduledExecutorService executorService
    )
focal_class.full_signature:   OvsdbConnectionHandler(
        CompletableFuture<OvsdbClient> ovsdbClientFuture, ScheduledExecutorService executorService
    )
focal_class.identifier: OvsdbConnectionHandler
focal_class.parameters: (
        CompletableFuture<OvsdbClient> ovsdbClientFuture, ScheduledExecutorService executorService
    )
focal_class.signature:  OvsdbConnectionHandler(
        CompletableFuture<OvsdbClient> ovsdbClientFuture, ScheduledExecutorService executorService
    )
focal_class.class_method_signature: OvsdbConnectionHandler.OvsdbConnectionHandler(
        CompletableFuture<OvsdbClient> ovsdbClientFuture, ConnectionCallback connectionCallback,
        ScheduledExecutorService executorService
    )
focal_class.full_signature: private  OvsdbConnectionHandler(
        CompletableFuture<OvsdbClient> ovsdbClientFuture, ConnectionCallback connectionCallback,
        ScheduledExecutorService executorService
    )
focal_class.identifier: OvsdbConnectionHandler
focal_class.modifiers: private
focal_class.parameters: (
        CompletableFuture<OvsdbClient> ovsdbClientFuture, ConnectionCallback connectionCallback,
        ScheduledExecutorService executorService
    )
focal_class.signature:  OvsdbConnectionHandler(
        CompletableFuture<OvsdbClient> ovsdbClientFuture, ConnectionCallback connectionCallback,
        ScheduledExecutorService executorService
    )
focal_class.class_method_signature: OvsdbConnectionHandler.channelActive(final ChannelHandlerContext ctx)
focal_class.full_signature: @Override public void channelActive(final ChannelHandlerContext ctx)
focal_class.identifier: channelActive
focal_class.modifiers: @Override public
focal_class.parameters: (final ChannelHandlerContext ctx)
focal_class.return: void
focal_class.signature: void channelActive(final ChannelHandlerContext ctx)
focal_class.class_method_signature: OvsdbConnectionHandler.channelRead(ChannelHandlerContext ctx, Object msg)
focal_class.full_signature: @Override public void channelRead(ChannelHandlerContext ctx, Object msg)
focal_class.identifier: channelRead
focal_class.modifiers: @Override public
focal_class.parameters: (ChannelHandlerContext ctx, Object msg)
focal_class.return: void
focal_class.signature: void channelRead(ChannelHandlerContext ctx, Object msg)
focal_class.class_method_signature: OvsdbConnectionHandler.channelInactive(ChannelHandlerContext ctx)
focal_class.full_signature: @Override public void channelInactive(ChannelHandlerContext ctx)
focal_class.identifier: channelInactive
focal_class.modifiers: @Override public
focal_class.parameters: (ChannelHandlerContext ctx)
focal_class.return: void
focal_class.signature: void channelInactive(ChannelHandlerContext ctx)
focal_class.class_method_signature: OvsdbConnectionHandler.userEventTriggered(ChannelHandlerContext ctx, Object evt)
focal_class.full_signature: @Override public void userEventTriggered(ChannelHandlerContext ctx, Object evt)
focal_class.identifier: userEventTriggered
focal_class.modifiers: @Override public
focal_class.parameters: (ChannelHandlerContext ctx, Object evt)
focal_class.return: void
focal_class.signature: void userEventTriggered(ChannelHandlerContext ctx, Object evt)
focal_class.class_method_signature: OvsdbConnectionHandler.isHeartbeatResponse(JsonNode msgNode)
focal_class.full_signature: private boolean isHeartbeatResponse(JsonNode msgNode)
focal_class.identifier: isHeartbeatResponse
focal_class.modifiers: private
focal_class.parameters: (JsonNode msgNode)
focal_class.return: boolean
focal_class.signature: boolean isHeartbeatResponse(JsonNode msgNode)
focal_class.class_method_signature: OvsdbConnectionHandler.getHeartbeatMsg()
focal_class.full_signature: private String getHeartbeatMsg()
focal_class.identifier: getHeartbeatMsg
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getHeartbeatMsg()
focal_class.class_method_signature: OvsdbConnectionHandler.notifyConnection(Channel channel)
focal_class.full_signature: private void notifyConnection(Channel channel)
focal_class.identifier: notifyConnection
focal_class.modifiers: private
focal_class.parameters: (Channel channel)
focal_class.return: void
focal_class.signature: void notifyConnection(Channel channel)
focal_class.superclass: extends ChannelInboundHandlerAdapter
focal_method.body: @Override
    public void userEventTriggered(ChannelHandlerContext ctx, Object evt) {
      if (evt instanceof IdleStateEvent) {
        ++readIdleCount;
        LOGGER.warn(
            "Read idle of {} for {} times", ctx.channel(), readIdleCount);
        if (readIdleCount >= MAX_READ_IDLE_BEFORE_CLOSE) {
          LOGGER.warn("Read idle time reaches the threshold. Closing the channel to {}",
              ctx.channel());
          ctx.close();
        } else {
          String heartbeatMsg = getHeartbeatMsg();
          LOGGER.debug("Sending heartbeat {} to channel {}", heartbeatMsg, ctx.channel());
          ctx.writeAndFlush(heartbeatMsg);
        }
      } else {
        ctx.fireUserEventTriggered(evt);
      }
    }
focal_method.class_method_signature: OvsdbConnectionHandler.userEventTriggered(ChannelHandlerContext ctx, Object evt)
focal_method.full_signature: @Override public void userEventTriggered(ChannelHandlerContext ctx, Object evt)
focal_method.identifier: userEventTriggered
focal_method.invocations: warn channel warn channel close getHeartbeatMsg debug channel writeAndFlush fireUserEventTriggered
focal_method.modifiers: @Override public
focal_method.parameters: (ChannelHandlerContext ctx, Object evt)
focal_method.return: void
focal_method.signature: void userEventTriggered(ChannelHandlerContext ctx, Object evt)