@Test public void testNack() { MyStreamEntity streamEntity = new MyStreamEntity(); BasicAckableForTesting ackable = new BasicAckableForTesting(); streamEntity.addCallBack(ackable); streamEntity.nack(new RuntimeException()); Assert.assertEquals(ackable.nacked, 1); Assert.assertTrue(ackable.throwable instanceof RuntimeException); }
@Override public void nack(Throwable error) { for (Ackable ackable : _callbacks) { ackable.nack(error); } }
StreamEntity implements Ackable { @Override public void nack(Throwable error) { for (Ackable ackable : _callbacks) { ackable.nack(error); } } }
StreamEntity implements Ackable { @Override public void nack(Throwable error) { for (Ackable ackable : _callbacks) { ackable.nack(error); } } protected  StreamEntity(); protected  StreamEntity(StreamEntity<?> upstreamEntity, boolean copyCallbacks); protected  StreamEntity(ForkedEntityBuilder forkedEntityBuilder, boolean copyCallbacks); }
StreamEntity implements Ackable { @Override public void nack(Throwable error) { for (Ackable ackable : _callbacks) { ackable.nack(error); } } protected  StreamEntity(); protected  StreamEntity(StreamEntity<?> upstreamEntity, boolean copyCallbacks); protected  StreamEntity(ForkedEntityBuilder forkedEntityBuilder, boolean copyCallbacks); @Override void ack(); @Override void nack(Throwable error); StreamEntity<D> addCallBack(Ackable ackable); final StreamEntity<D> getSingleClone(); ForkCloner forkCloner(); }
StreamEntity implements Ackable { @Override public void nack(Throwable error) { for (Ackable ackable : _callbacks) { ackable.nack(error); } } protected  StreamEntity(); protected  StreamEntity(StreamEntity<?> upstreamEntity, boolean copyCallbacks); protected  StreamEntity(ForkedEntityBuilder forkedEntityBuilder, boolean copyCallbacks); @Override void ack(); @Override void nack(Throwable error); StreamEntity<D> addCallBack(Ackable ackable); final StreamEntity<D> getSingleClone(); ForkCloner forkCloner();  }