public class BmpDispatcherImpl implements BmpDispatcher {
private static final Logger LOG = LoggerFactory.getLogger(BmpDispatcherImpl.class);
+ private static final int MAX_CONNECTIONS_COUNT = 128;
private final BmpHandlerFactory hf;
private final EventLoopGroup bossGroup;
}
});
- b.option(ChannelOption.SO_BACKLOG, 128);
+ b.option(ChannelOption.SO_BACKLOG, MAX_CONNECTIONS_COUNT);
b.childOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT);
if (keys.isPresent()) {
try {
super.channelInactive(ctx);
} catch (final Exception e) {
- throw new RuntimeException("Failed to delegate channel inactive event on channel " + ctx.channel(), e);
+ throw new IllegalStateException("Failed to delegate channel inactive event on channel " + ctx.channel(), e);
}
}
}
@Override
- public final String toString() {
+ public String toString() {
return addToStringAttributes(MoreObjects.toStringHelper(this)).toString();
}
}
}
- private static Reason getTerminationReason(TerminationMessage terminationMessage) {
+ private static Reason getTerminationReason(final TerminationMessage terminationMessage) {
final Tlvs tlvs = terminationMessage.getTlvs();
if (tlvs != null && tlvs.getReasonTlv() != null) {
return tlvs.getReasonTlv().getReason();