@ SuppressWarnings ( { "rawtypes" , "unchecked" } ) @ Override public synchronized void start ( final Listener listener , final Infrastructure infra ) { if ( listener == null ) throw new IllegalArgumentException ( "Cannot pass null to " + BlockingQueueReceiver . class . getSimpleName ( ) + ".setListener" ) ; if ( this . listener != null ) throw new IllegalStateException ( "Cannot set a new Listener (" + SafeString . objectDescription ( listener ) + ") on a " + BlockingQueueReceiver . class . getSimpleName ( ) + " when there's one already set (" + SafeString . objectDescription ( this . listener ) + ")" ) ; this . listener = listener ; infra . getThreadingModel ( ) . runDaemon ( this , "BQReceiver-" + address . toString ( ) ) ; }
A BlockingQueueAdaptor requires a MessageTransportListener to be set in order to adapt a client side .