synchronized public E get ( ) { if ( this . isClosed ( ) ) throw new NoSuchElementException ( ) ; while ( this . elements . isEmpty ( ) ) { try { this . wait ( ) ; } catch ( final InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; throw new RuntimeException ( e ) ; } } return this . elements . remove ( ) ; }
Get an element from the bus . Blocking method .