/** * Default constructor that creates {@link WebSocketServerFactory} through * its default constructor thus using a default {@link WebSocketPolicy}. */ public JettyRequestUpgradeStrategy() { this.policy = WebSocketPolicy.newServerPolicy(); }
configuredPolicy = WebSocketPolicy.newServerPolicy(); configurePolicy(context, configuredPolicy);
@Override public void init(FilterConfig filterConfig) throws ServletException { super.init(filterConfig); try { WebSocketPolicy serverPolicy = WebSocketPolicy.newServerPolicy(); String inputBufferSize = filterConfig.getInitParameter("inputBufferSize"); if (inputBufferSize != null) { serverPolicy.setInputBufferSize(Integer.parseInt(inputBufferSize)); } String idleTimeout = filterConfig.getInitParameter("idleTimeout"); if (idleTimeout != null) { serverPolicy.setIdleTimeout(Integer.parseInt(idleTimeout)); } String maxTextMessageSize = filterConfig.getInitParameter("maxTextMessageSize"); if (maxTextMessageSize != null) { serverPolicy.setMaxTextMessageSize(Integer.parseInt(maxTextMessageSize)); } webSocketFactory = new WebSocketServerFactory(filterConfig.getServletContext(), serverPolicy); webSocketFactory.setCreator((request, response) -> createWebSocketAdapter(request)); webSocketFactory.start(); } catch (ServletException e) { throw e; } catch (Exception e) { throw new ServletException(e); } }
/** * Default constructor that creates {@link WebSocketServerFactory} through * its default constructor thus using a default {@link WebSocketPolicy}. */ public JettyRequestUpgradeStrategy() { this.policy = WebSocketPolicy.newServerPolicy(); }
public WebSocketServerFactory(ServletContext context, ByteBufferPool bufferPool) { this(context, WebSocketPolicy.newServerPolicy(), bufferPool); }
/** * Default constructor that creates {@link WebSocketServerFactory} through * its default constructor thus using a default {@link WebSocketPolicy}. */ public JettyRequestUpgradeStrategy() { this.policy = WebSocketPolicy.newServerPolicy(); }
/** * Entry point for Spring Boot's MockMVC framework */ public WebSocketServerFactory() { this(WebSocketPolicy.newServerPolicy(), null, new MappedByteBufferPool()); }
public WebSocketServerFactory(ServletContext context) { this(context, WebSocketPolicy.newServerPolicy(), new MappedByteBufferPool()); }
public WebSocketServerFactory() { this(WebSocketPolicy.newServerPolicy(),new MappedByteBufferPool()); }
public WebSocketServerFactory() { this(WebSocketPolicy.newServerPolicy(),new MappedByteBufferPool()); }
@Override public WebSocketPolicy get() { WebSocketPolicy policy = WebSocketPolicy.newServerPolicy(); policy.setIdleTimeout(serverConfig.getSessionTimeout()*1000); return policy; }
outgoingChannel = Files.newByteChannel(outgoingFramesPath,CREATE,WRITE); this.generator = new Generator(WebSocketPolicy.newServerPolicy(),getBufferPool(),false,true);