Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2012-08-08 02:08:47 -0400
committerGreg Wilkins2012-08-08 02:08:47 -0400
commit9c9668b112903bac637bf1cb9586517f64a817c8 (patch)
tree748796c7da829e5c979d2126bccf282d810d3004 /jetty-websocket
parent689daf092d59349e5026daef8cdf04420167d714 (diff)
downloadorg.eclipse.jetty.project-9c9668b112903bac637bf1cb9586517f64a817c8.tar.gz
org.eclipse.jetty.project-9c9668b112903bac637bf1cb9586517f64a817c8.tar.xz
org.eclipse.jetty.project-9c9668b112903bac637bf1cb9586517f64a817c8.zip
ported websocketchat to new API
Diffstat (limited to 'jetty-websocket')
-rw-r--r--jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServlet.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServlet.java b/jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServlet.java
index 5d660b9c11..2548c0e589 100644
--- a/jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServlet.java
+++ b/jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServlet.java
@@ -132,7 +132,7 @@ public abstract class WebSocketServlet extends HttpServlet
policy.setMaxBinaryMessageSize(Integer.parseInt(max));
}
- webSocketFactory = new WebSocketServerFactory(policy);
+ webSocketFactory = newWebSocketServerFactory(policy);
registerWebSockets(webSocketFactory);
@@ -144,6 +144,15 @@ public abstract class WebSocketServlet extends HttpServlet
}
}
+ /**
+ * Create a new WebSocketServerFactory.
+ * This methods allows the factory instance to be overridden by derived Servlets.
+ */
+ protected WebSocketServerFactory newWebSocketServerFactory(WebSocketPolicy policy)
+ {
+ return new WebSocketServerFactory(policy);
+ }
+
public abstract void registerWebSockets(WebSocketServerFactory factory);
/**

Back to the top