use of com.vaadin.client.communication.MessageHandler in project flow by vaadin.
the class GwtRouterLinkHandlerTest method gwtSetUp.
@Override
protected void gwtSetUp() throws Exception {
super.gwtSetUp();
invocations = JsCollections.array();
ServerConnector connector = new ServerConnector(null) {
@Override
public void sendNavigationMessage(String location, Object stateObject, boolean routerLinkEvent) {
invocations.push(location);
}
};
UILifecycle lifecycle = new UILifecycle();
lifecycle.setState(UIState.RUNNING);
registry = new Registry() {
{
set(UILifecycle.class, lifecycle);
set(ServerConnector.class, connector);
set(MessageHandler.class, new MessageHandler(this));
set(RequestResponseTracker.class, new RequestResponseTracker(this));
set(ScrollPositionHandler.class, new ScrollPositionHandler(this));
}
};
boundElement = Browser.getDocument().createDivElement();
Browser.getDocument().getBody().appendChild(boundElement);
RouterLinkHandler.bind(registry, boundElement);
}
use of com.vaadin.client.communication.MessageHandler in project flow by vaadin.
the class GwtDomApiTest method gwtSetUp.
@Override
protected void gwtSetUp() throws Exception {
super.gwtSetUp();
registry = new Registry() {
{
UILifecycle uiLifecycle = new UILifecycle();
uiLifecycle.setState(UIState.RUNNING);
set(UILifecycle.class, uiLifecycle);
set(RequestResponseTracker.class, new RequestResponseTracker(this));
set(MessageHandler.class, new MessageHandler(this));
set(ServerRpcQueue.class, new ServerRpcQueue(this));
set(DependencyLoader.class, new DependencyLoader(this));
set(ResourceLoader.class, new ResourceLoader(this, false));
}
};
registry.getRequestResponseTracker().startRequest();
}
Aggregations