public void post(Object event) {
    if (event == null) {
      throw new NullPointerException("Event to post must not be null.");
    }
    enforcer.enforce(this);

    Set<Class<?>> dispatchTypes = flattenHierarchy(event.getClass());

    boolean dispatched = false;
    for (Class<?> eventType : dispatchTypes) {
      Set<EventHandler> wrappers = getHandlersForEventType(eventType);

      if (wrappers != null && !wrappers.isEmpty()) {
        dispatched = true;
        for (EventHandler wrapper : wrappers) {
          enqueueEvent(event, wrapper);
        }
      }
    }

    if (!dispatched && !(event instanceof DeadEvent)) {
      post(new DeadEvent(this, event));
    }

    dispatchQueuedEvents();
  }
Posts an event to all registered handlers.  This method will return successfully after the event has been posted to
all handlers, and regardless of any exceptions thrown by handlers.

<p>If no handlers have been subscribed for {@code event}'s class, and {@code event} is not already a
{@link DeadEvent}, it will be wrapped in a DeadEvent and reposted.

@param event event to post.
@throws NullPointerException if the event is null.
otto/src/main/java/com/squareup/otto/Bus.java