use of org.apache.wicket.examples.websocket.charts.ChartWebSocketResource in project wicket by apache.
the class JSR356Application method init.
@Override
public void init() {
super.init();
scheduledExecutorService = Executors.newScheduledThreadPool(1);
setRootRequestMapper(new HttpsMapper(getRootRequestMapper(), new HttpsConfig(8080, 8443)));
mountPage("/behavior", WebSocketBehaviorDemoPage.class);
mountPage("/resource", WebSocketResourceDemoPage.class);
getSharedResources().add(ChartWebSocketResource.NAME, new ChartWebSocketResource());
if (System.getenv("OPENSHIFT_APP_NAME") != null) {
// OpenShift uses special proxy for WebSocket connections
// https://blog.openshift.com/paas-websockets/
final WebSocketSettings webSocketSettings = WebSocketSettings.Holder.get(this);
webSocketSettings.setPort(8000);
webSocketSettings.setSecurePort(8443);
}
}
Aggregations