class IbftChainObserver implements BlockAddedObserver {

  @Override
  public void onBlockAdded(final BlockAddedEvent event) {
    switch (event.getEventType()) {
      case HEAD_ADVANCED:
        queue.add(new NewChainHead(event.getBlock().getHeader()));
        break;

      default:
        throw new IllegalStateException(
            String.format("Unexpected BlockAddedEvent received: %s", event.getEventType()));
    }
  }

  public  IbftChainObserver(final IbftEventQueue queue);

}