@Override public ErraiServiceConfigurator getConfiguration() { return service.getConfiguration(); }
public void start() { final ErraiServiceConfigurator esc = svc.getConfiguration(); useSecureWebSocket = ErraiConfigAttribs.SECURE_WEB_SOCKET_SERVER.getBoolean(esc); final int port = ErraiConfigAttribs.WEB_SOCKET_PORT.getInt(esc);
private void handleHttpRequest(final ChannelHandlerContext ctx, final FullHttpRequest req) throws Exception { // Allow only GET methods. if (req.getMethod() != GET) { sendHttpResponse(ctx, req, new DefaultFullHttpResponse(HTTP_1_1, FORBIDDEN)); return; } int maxFrameSize = ErraiConfigAttribs.WEB_SOCKET_MAX_FRAME_SIZE.getInt(svc.getConfiguration()); // Handshake final WebSocketServerHandshakerFactory wsFactory = new WebSocketServerHandshakerFactory( this.getWebSocketLocation(req), null, false, maxFrameSize); this.handshaker = wsFactory.newHandshaker(req); if (this.handshaker == null) { wsFactory.sendUnsupportedWebSocketVersionResponse(ctx.channel()); } else { this.handshaker.handshake(ctx.channel(), req); } }
private void configureSettings() { final ErraiServiceConfigurator config = service.getConfiguration(); final boolean hostedModeTesting = ErraiConfigAttribs.HOSTED_MODE_TESTING.getBoolean(config); longPollingEnabled = !hostedModeTesting && ErraiConfigAttribs.DO_LONG_POLL.getBoolean(config); longPollTimeout = ErraiConfigAttribs.LONG_POLL_TIMEOUT.getInt(config); sseTimeout = ErraiConfigAttribs.SSE_TIMEOUT.getInt(config); csrfSecurityCheck = (ErraiConfigAttribs.ENABLE_CSRF_BUS_TOKEN.getBoolean(config) ? CSRFTokenCheck.INSTANCE : RequestSecurityCheck.noCheck()); }
this.svc = svc; ErraiServiceConfigurator cfg = svc.getConfiguration();
@Override public ErraiServiceConfigurator getConfiguration() { return service.getConfiguration(); }
public void start() { final ErraiServiceConfigurator esc = svc.getConfiguration(); useSecureWebSocket = ErraiConfigAttribs.SECURE_WEB_SOCKET_SERVER.getBoolean(esc); final int port = ErraiConfigAttribs.WEB_SOCKET_PORT.getInt(esc);
private void handleHttpRequest(final ChannelHandlerContext ctx, final FullHttpRequest req) throws Exception { // Allow only GET methods. if (req.getMethod() != GET) { sendHttpResponse(ctx, req, new DefaultFullHttpResponse(HTTP_1_1, FORBIDDEN)); return; } int maxFrameSize = ErraiConfigAttribs.WEB_SOCKET_MAX_FRAME_SIZE.getInt(svc.getConfiguration()); // Handshake final WebSocketServerHandshakerFactory wsFactory = new WebSocketServerHandshakerFactory( this.getWebSocketLocation(req), null, false, maxFrameSize); this.handshaker = wsFactory.newHandshaker(req); if (this.handshaker == null) { wsFactory.sendUnsupportedWebSocketVersionResponse(ctx.channel()); } else { this.handshaker.handshake(ctx.channel(), req); } }
private void configureSettings() { final ErraiServiceConfigurator config = service.getConfiguration(); final boolean hostedModeTesting = ErraiConfigAttribs.HOSTED_MODE_TESTING.getBoolean(config); longPollingEnabled = !hostedModeTesting && ErraiConfigAttribs.DO_LONG_POLL.getBoolean(config); longPollTimeout = ErraiConfigAttribs.LONG_POLL_TIMEOUT.getInt(config); sseTimeout = ErraiConfigAttribs.SSE_TIMEOUT.getInt(config); csrfSecurityCheck = (ErraiConfigAttribs.ENABLE_CSRF_BUS_TOKEN.getBoolean(config) ? CSRFTokenCheck.INSTANCE : RequestSecurityCheck.noCheck()); }
this.svc = svc; ErraiServiceConfigurator cfg = svc.getConfiguration();