Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename the application class

  • Loading branch information...
commit 9e4ea25e9fc4f5f96dcdcb06bd2009e451b10807 1 parent 142fe22
@martin-g authored
View
14 ...ket/jetty/example/WicketApplication.scala → ...e/NativeWebSocketExampleApplication.scala
@@ -2,10 +2,16 @@ package org.apache.wicket.websocket.jetty.example
import org.apache.wicket.protocol.http.WebApplication
+object NativeWebSocketExampleApplication
+{
+ def get = WebApplication.get().asInstanceOf[NativeWebSocketExampleApplication]
+}
+
/**
- *
+ * The application class that setups the event system that pushes messages
+ * to the connected clients
*/
-class WicketApplication extends WebApplication
+class NativeWebSocketExampleApplication extends WebApplication
{
var eventSystem : EventSystem = _
@@ -25,9 +31,5 @@ class WicketApplication extends WebApplication
def getEventSystem = eventSystem
}
-object WicketApplication
-{
- def get = WebApplication.get().asInstanceOf[WicketApplication]
-}
View
4 src/main/scala/org/apache/wicket/websocket/jetty/example/WebSocketDemo.scala
@@ -26,7 +26,7 @@ class WebSocketDemo extends WebPage {
val sessionId = message.getSessionId
val pageId = message.getPageId
// register in the global registry. Optional
- WicketApplication.get.getEventSystem.clientConnected(application.getName, sessionId, pageId)
+ NativeWebSocketExampleApplication.get.getEventSystem.clientConnected(application.getName, sessionId, pageId)
}
protected override def onClose(message: ClosedMessage)
@@ -35,7 +35,7 @@ class WebSocketDemo extends WebPage {
val sessionId = message.getSessionId
val pageId = message.getPageId
// unregister in the global registry. Optional
- WicketApplication.get.getEventSystem.clientDisconnected(application.getName, sessionId, pageId)
+ NativeWebSocketExampleApplication.get.getEventSystem.clientDisconnected(application.getName, sessionId, pageId)
}
/**
View
2  src/main/webapp/WEB-INF/web.xml
@@ -13,7 +13,7 @@
<!--<filter-class>org.apache.wicket.protocol.http.Tomcat7WebSocketFilter</filter-class>-->
<init-param>
<param-name>applicationClassName</param-name>
- <param-value>org.apache.wicket.websocket.jetty.example.WicketApplication</param-value>
+ <param-value>org.apache.wicket.websocket.jetty.example.NativeWebSocketExampleApplication</param-value>
</init-param>
</filter>
Please sign in to comment.
Something went wrong with that request. Please try again.