Package io.undertow.websockets.jsr.handshake

Examples of io.undertow.websockets.jsr.handshake.JsrHybi13Handshake


    private static Set<Handshake> handshakes(ConfiguredServerEndpoint... configs) {
        Set<Handshake> handshakes = new HashSet<>();
        for (ConfiguredServerEndpoint config : configs) {
            handshakes.add(new JsrHybi07Handshake(config));
            handshakes.add(new JsrHybi08Handshake(config));
            handshakes.add(new JsrHybi13Handshake(config));
        }
        return handshakes;
    }
View Full Code Here


    private PathTemplateMatcher<WebSocketHandshakeHolder> pathTemplateMatcher;
    private Set<WebSocketChannel> peerConnections;

    protected WebSocketHandshakeHolder handshakes(ConfiguredServerEndpoint config) {
        List<Handshake> handshakes = new ArrayList<>();
        handshakes.add(new JsrHybi13Handshake(config));
        handshakes.add(new JsrHybi08Handshake(config));
        handshakes.add(new JsrHybi07Handshake(config));
        return new WebSocketHandshakeHolder(handshakes, config);
    }
View Full Code Here

    protected Map<ConfiguredServerEndpoint, List<Handshake>> handshakes(List<ConfiguredServerEndpoint> configs) {
        final IdentityHashMap<ConfiguredServerEndpoint, List<Handshake>> ret = new IdentityHashMap<ConfiguredServerEndpoint, List<Handshake>>();
        for (ConfiguredServerEndpoint config : configs) {
            List<Handshake> handshakes = new ArrayList<Handshake>();
            handshakes.add(new JsrHybi13Handshake(config));
            handshakes.add(new JsrHybi08Handshake(config));
            handshakes.add(new JsrHybi07Handshake(config));
            ret.put(config, handshakes);
        }
        return ret;
View Full Code Here

    private WebSocketConnectionCallback callback;
    private PathTemplateMatcher<WebSocketHandshakeHolder> pathTemplateMatcher;

    protected WebSocketHandshakeHolder handshakes(ConfiguredServerEndpoint config) {
        List<Handshake> handshakes = new ArrayList<Handshake>();
        handshakes.add(new JsrHybi13Handshake(config));
        handshakes.add(new JsrHybi08Handshake(config));
        handshakes.add(new JsrHybi07Handshake(config));
        return new WebSocketHandshakeHolder(handshakes, config);
    }
View Full Code Here

    private static Set<Handshake> handshakes(ConfiguredServerEndpoint... configs) {
        Set<Handshake> handshakes = new HashSet<Handshake>();
        for (ConfiguredServerEndpoint config : configs) {
            handshakes.add(new JsrHybi07Handshake(config));
            handshakes.add(new JsrHybi08Handshake(config));
            handshakes.add(new JsrHybi13Handshake(config));
        }
        return handshakes;
    }
View Full Code Here

    private PathTemplateMatcher<WebSocketHandshakeHolder> pathTemplateMatcher;
    private Set<WebSocketChannel> peerConnections;

    protected WebSocketHandshakeHolder handshakes(ConfiguredServerEndpoint config) {
        List<Handshake> handshakes = new ArrayList<>();
        handshakes.add(new JsrHybi13Handshake(config));
        handshakes.add(new JsrHybi08Handshake(config));
        handshakes.add(new JsrHybi07Handshake(config));
        return new WebSocketHandshakeHolder(handshakes, config);
    }
View Full Code Here

        return new WebSocketHandshakeHolder(handshakes, config);
    }

    protected WebSocketHandshakeHolder handshakes(ConfiguredServerEndpoint config, List<ExtensionHandshake> extensions) {
        List<Handshake> handshakes = new ArrayList<>();
        Handshake jsrHybi13Handshake = new JsrHybi13Handshake(config);
        Handshake jsrHybi08Handshake = new JsrHybi08Handshake(config);
        Handshake jsrHybi07Handshake = new JsrHybi07Handshake(config);
        for (ExtensionHandshake extension : extensions) {
            jsrHybi13Handshake.addExtension(extension);
            jsrHybi08Handshake.addExtension(extension);
            jsrHybi07Handshake.addExtension(extension);
        }
        handshakes.add(jsrHybi13Handshake);
        handshakes.add(jsrHybi08Handshake);
View Full Code Here

    protected Map<ConfiguredServerEndpoint, List<Handshake>> handshakes(List<ConfiguredServerEndpoint> configs) {
        final IdentityHashMap<ConfiguredServerEndpoint, List<Handshake>> ret = new IdentityHashMap<ConfiguredServerEndpoint, List<Handshake>>();
        for (ConfiguredServerEndpoint config : configs) {
            List<Handshake> handshakes = new ArrayList<Handshake>();
            handshakes.add(new JsrHybi13Handshake(config));
            handshakes.add(new JsrHybi08Handshake(config));
            handshakes.add(new JsrHybi07Handshake(config));
            ret.put(config, handshakes);
        }
        return ret;
View Full Code Here

      throw new HandshakeFailureException("Failed to instantiate ServletWebSocketHttpExchange", ex);
    }
  }

  private Handshake getHandshakeToUse(ServletWebSocketHttpExchange exchange, ConfiguredServerEndpoint endpoint) {
    Handshake handshake = new JsrHybi13Handshake(endpoint);
    if (handshake.matches(exchange)) {
      return handshake;
    }
    handshake = new JsrHybi08Handshake(endpoint);
    if (handshake.matches(exchange)) {
      return handshake;
    }
    handshake = new JsrHybi07Handshake(endpoint);
    if (handshake.matches(exchange)) {
      return handshake;
    }
    // Should never occur
    throw new HandshakeFailureException("No matching Undertow Handshake found: " + exchange.getRequestHeaders());
  }
View Full Code Here

    private PathTemplateMatcher<WebSocketHandshakeHolder> pathTemplateMatcher;
    private Set<WebSocketChannel> peerConnections;

    protected WebSocketHandshakeHolder handshakes(ConfiguredServerEndpoint config) {
        List<Handshake> handshakes = new ArrayList<Handshake>();
        handshakes.add(new JsrHybi13Handshake(config));
        handshakes.add(new JsrHybi08Handshake(config));
        handshakes.add(new JsrHybi07Handshake(config));
        return new WebSocketHandshakeHolder(handshakes, config);
    }
View Full Code Here

TOP

Related Classes of io.undertow.websockets.jsr.handshake.JsrHybi13Handshake

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.