{
super.init(isServlet, filterConfig);
try
{
WebSocketPolicy serverPolicy = WebSocketPolicy.newServerPolicy();
String bs = filterConfig.getInitParameter("bufferSize");
if (bs != null)
serverPolicy.setBufferSize(Integer.parseInt(bs));
String max = filterConfig.getInitParameter("maxIdleTime");
if (max != null)
serverPolicy.setIdleTimeout(Integer.parseInt(max));
max = filterConfig.getInitParameter("maxTextMessageSize");
if (max != null)
serverPolicy.setMaxTextMessageSize(Integer.parseInt(max));
max = filterConfig.getInitParameter("maxBinaryMessageSize");
if (max != null)
serverPolicy.setMaxBinaryMessageSize(Integer.parseInt(max));
_webSocketFactory = new WebSocketServerFactory(serverPolicy);
_webSocketFactory.setCreator(new WebSocketCreator()
{
@Override