com.google.gwt.place.shared

## Class PlaceHistoryHandler

- java.lang.Object
- - com.google.gwt.place.shared.PlaceHistoryHandler

-     public class PlaceHistoryHandler
      extends java.lang.Object

  Monitors `PlaceChangeEvent`s and `History` events and keep them in sync.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `PlaceHistoryHandler.DefaultHistorian` Default implementation of `PlaceHistoryHandler.Historian`, based on `History`.
    `static interface` | `PlaceHistoryHandler.Historian` Optional delegate in charge of History related events.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PlaceHistoryHandler(PlaceHistoryMapper mapper)` Create a new PlaceHistoryHandler with a `PlaceHistoryHandler.DefaultHistorian`.
    `PlaceHistoryHandler(PlaceHistoryMapper mapper, PlaceHistoryHandler.Historian historian)` Create a new PlaceHistoryHandler.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `handleCurrentHistory()` Handle the current history token.
    `(package private) java.util.logging.Logger` | `log()` Visible for testing.
    `HandlerRegistration` | `register(PlaceController placeController, EventBus eventBus, Place defaultPlace)` Deprecated. use `register(PlaceController, EventBus, Place)`
    `HandlerRegistration` | `register(PlaceController placeController, EventBus eventBus, Place defaultPlace)` Initialize this place history handler.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PlaceHistoryHandler

          public PlaceHistoryHandler(PlaceHistoryMapper mapper)

      Create a new PlaceHistoryHandler with a `PlaceHistoryHandler.DefaultHistorian`. The DefaultHistorian is created via a call to GWT.create(), so an alternative default implementation can be provided through <replace-with> rules in a `gwt.xml` file.
      Parameters:
        `mapper` - a `PlaceHistoryMapper` instance

    - #### PlaceHistoryHandler

          public PlaceHistoryHandler(PlaceHistoryMapper mapper,
                                     PlaceHistoryHandler.Historian historian)

      Create a new PlaceHistoryHandler.
      Parameters:
        `mapper` - a `PlaceHistoryMapper` instance
        `historian` - a `PlaceHistoryHandler.Historian` instance

  - ### Method Detail

    - #### handleCurrentHistory

          public void handleCurrentHistory()

      Handle the current history token. Typically called at application start, to ensure bookmark launches work.

    - #### register

          @Deprecated
          public HandlerRegistration register(PlaceController placeController,
                                                          EventBus eventBus,
                                                          Place defaultPlace)

      Deprecated. use `register(PlaceController, EventBus, Place)`
      Legacy method tied to the old location for `EventBus`.

    - #### register

          public HandlerRegistration register(PlaceController placeController,
                                              EventBus eventBus,
                                              Place defaultPlace)

      Initialize this place history handler.
      Returns:
        a registration object to de-register the handler

    - #### log

          java.util.logging.Logger log()

      Visible for testing.