Package com.google.gwt.place.shared
Class PlaceHistoryHandler
- java.lang.Object
-
- com.google.gwt.place.shared.PlaceHistoryHandler
-
public class PlaceHistoryHandler extends java.lang.Object
MonitorsPlaceChangeEvent
s andHistory
events and keep them in sync.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PlaceHistoryHandler.DefaultHistorian
Default implementation ofPlaceHistoryHandler.Historian
, based onHistory
.static interface
PlaceHistoryHandler.Historian
Optional delegate in charge of History related events.
-
Constructor Summary
Constructors Constructor Description PlaceHistoryHandler(PlaceHistoryMapper mapper)
Create a new PlaceHistoryHandler with aPlaceHistoryHandler.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 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.HandlerRegistration
register(PlaceController placeController, EventBus eventBus, Place defaultPlace)
Initialize this place history handler.
-
-
-
Constructor Detail
-
PlaceHistoryHandler
public PlaceHistoryHandler(PlaceHistoryMapper mapper)
Create a new PlaceHistoryHandler with aPlaceHistoryHandler.DefaultHistorian
. The DefaultHistorian is created via a call to GWT.create(), so an alternative default implementation can be provided through <replace-with> rules in agwt.xml
file.- Parameters:
mapper
- aPlaceHistoryMapper
instance
-
PlaceHistoryHandler
public PlaceHistoryHandler(PlaceHistoryMapper mapper, PlaceHistoryHandler.Historian historian)
Create a new PlaceHistoryHandler.- Parameters:
mapper
- aPlaceHistoryMapper
instancehistorian
- aPlaceHistoryHandler.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.Legacy method tied to the old location forEventBus
.
-
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.
-
-