@Test public void testReceiveCorrectId() throws DataSinkException { notifier.register(listener); assertNull(receivedId); SimpleVehicleMessage message = new SimpleVehicleMessage(messageId, 1); notifier.receive(message); try { Thread.sleep(50); } catch(InterruptedException e) {} assertNotNull(receivedId); assertEquals(receivedId, messageId); }
public synchronized void register(VehicleServiceListener listener) { synchronized(mListeners) { if(mListeners.register(listener)) { ++mListenerCount; } } }
RemoteCallbackSink extends AbstractQueuedCallbackSink { public synchronized void register(VehicleServiceListener listener) { synchronized(mListeners) { if(mListeners.register(listener)) { ++mListenerCount; } } } }
RemoteCallbackSink extends AbstractQueuedCallbackSink { public synchronized void register(VehicleServiceListener listener) { synchronized(mListeners) { if(mListeners.register(listener)) { ++mListenerCount; } } }  }
RemoteCallbackSink extends AbstractQueuedCallbackSink { public synchronized void register(VehicleServiceListener listener) { synchronized(mListeners) { if(mListeners.register(listener)) { ++mListenerCount; } } }  synchronized void register(VehicleServiceListener listener); void unregister(VehicleServiceListener listener); int getListenerCount(); @Override String toString(); }
RemoteCallbackSink extends AbstractQueuedCallbackSink { public synchronized void register(VehicleServiceListener listener) { synchronized(mListeners) { if(mListeners.register(listener)) { ++mListenerCount; } } }  synchronized void register(VehicleServiceListener listener); void unregister(VehicleServiceListener listener); int getListenerCount(); @Override String toString();  }