@ Override public final void setConsumer ( StreamConsumer < T > consumer ) { checkNotNull ( consumer ) ; checkState ( this . consumer == null , "Consumer has already been set" ) ; checkState ( getCapabilities ( ) . contains ( LATE_BINDING ) || eventloop . tick ( ) == createTick , LATE_BINDING_ERROR_MESSAGE , this ) ; this . consumer = consumer ; onWired ( ) ; consumer . getAcknowledgement ( ) . whenException ( this :: close ) . whenComplete ( acknowledgement ) ; }
Sets consumer for this supplier . At the moment of calling this method supplier shouldn t have consumer as well as consumer shouldn t have supplier otherwise there will be error