List of usage examples for org.apache.wicket Application get
public static Application get()
From source file:org.wicketstuff.whiteboard.WhiteboardBehavior.java
License:Apache License
/** * Load the clipArts list from the clipArt folder and synchronizing the list between whiteboard clients *///from w w w .j a v a2s . c o m private void handleClipArts() { loadClipArts(); IWebSocketConnectionRegistry reg = WebSocketSettings.Holder.get(Application.get()).getConnectionRegistry(); for (IWebSocketConnection c : reg.getConnections(Application.get())) { try { JSONArray jsonArray = new JSONArray(); for (String clipArtURL : clipArts) { jsonArray.put(clipArtURL); } c.sendMessage(getClipArtListMessage(jsonArray).toString()); } catch (Exception e) { log.error("Unexpected error while sending message through the web socket", e); } } }