@@ -0,0 +1,1381 @@
+package router.client.api2;%0A%0Aimport java.util.ArrayList;%0Aimport javax.annotation.Nonnull;%0Aimport javax.annotation.Nullable;%0A%0Apublic class RouteManager%0A%7B%0A  @Nonnull%0A  private OnChangeCallbackChain collectOnChangeCallbacks( @Nonnull String location )%0A  %7B%0A    return new OnChangeCallbackChain( new ArrayList%3C%3E() );%0A  %7D%0A%0A  @Nonnull%0A  private OnEnterCallbackChain collectOnEnterCallbacks( @Nonnull String location )%0A  %7B%0A    return new OnEnterCallbackChain( new ArrayList%3C%3E() );%0A  %7D%0A%0A  @Nonnull%0A  private OnLeaveCallbackChain collectOnLeaveCallbacks( @Nullable String location )%0A  %7B%0A    return new OnLeaveCallbackChain( new ArrayList%3C%3E() );%0A  %7D%0A%0A  public void route( @Nullable final String previousLocation,%0A                     @Nonnull final String newLocation,%0A                     @Nullable final Runnable routingCompleteAction )%0A  %7B%0A    collectOnChangeCallbacks( newLocation ).%0A      onChange( previousLocation,%0A                () -%3E runIfNonNull( routingCompleteAction ),%0A                () -%3E collectOnLeaveCallbacks( previousLocation ).%0A                  onLeave( () -%3E%0A                             collectOnEnterCallbacks( newLocation ).onEnter( () -%3E runIfNonNull( routingCompleteAction ) ) ) );%0A  %7D%0A%0A  private void runIfNonNull( @Nullable final Runnable routingCompleteAction )%0A  %7B%0A    if ( null != routingCompleteAction )%0A    %7B%0A      routingCompleteAction.run();%0A    %7D%0A  %7D%0A%7D%0A

Add idea/spike about layout of callback chains