public void onReceive ( Object object ) { if ( ! closed && object != null ) { synchronized ( queue ) { queue . addLast ( object ) ; if ( limit > 0 && queue . size ( ) > limit && ! queue . isEmpty ( ) ) { queue . removeFirst ( ) ; } } } }
Receives an object from a channel .