public static void checkUnWritabilityAndNotify ( ChannelHandlerContext context , BackPressureHandler backpressureHandler ) { if ( backpressureHandler != null ) { Channel channel = context . channel ( ) ; if ( ! channel . isWritable ( ) && channel . isActive ( ) ) { backpressureHandler . getBackPressureObservable ( ) . notifyUnWritable ( ) ; } } }
Checks if channel is unWritable and notifies BackPressure observable .