-
Notifications
You must be signed in to change notification settings - Fork 5
/
GSApp.java
39 lines (30 loc) · 1 KB
/
GSApp.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package org.genericsystem.reactor.gs;
import io.vertx.core.http.ServerWebSocket;
import org.genericsystem.reactor.ViewContext.RootViewContext;
import org.genericsystem.reactor.appserver.PersistentApplication.App;
import org.genericsystem.reactor.model.GenericModel;
public class GSApp extends GSSection implements App<GenericModel> {
private final ServerWebSocket webSocket;
private RootViewContext<GenericModel> rootViewContext;
public GSApp(ServerWebSocket webSocket) {
super(null, FlexDirection.COLUMN);
this.webSocket = webSocket;
}
@Override
public GSApp init(GenericModel rootModelContext, String rootId) {
rootViewContext = new RootViewContext<GenericModel>(rootModelContext, this, rootId);
return this;
}
@Override
public ServerWebSocket getWebSocket() {
return webSocket;
}
@Override
public HtmlDomNode getNodeById(String id) {
return rootViewContext.getNodeById(id);
}
@Override
protected HtmlDomNode createNode(String parentId) {
throw new UnsupportedOperationException();
}
}