Package org.springframework.web.socket

Examples of org.springframework.web.socket.WebSocketExtension


    this.acceptedProtocol = session.getUpgradeResponse().getAcceptedSubProtocol();

    List<ExtensionConfig> source = getNativeSession().getUpgradeResponse().getExtensions();
    this.extensions = new ArrayList<WebSocketExtension>(source.size());
    for (ExtensionConfig ec : source) {
      this.extensions.add(new WebSocketExtension(ec.getName(), ec.getParameters()));
    }

    if (this.user == null) {
      this.user = session.getUpgradeRequest().getUserPrincipal();
    }
View Full Code Here



  @Test
  public void supportedExtensions() throws Exception {

    WebSocketExtension extension1 = new WebSocketExtension("ext1");
    WebSocketExtension extension2 = new WebSocketExtension("ext2");

    given(this.upgradeStrategy.getSupportedVersions()).willReturn(new String[] {"13"});
    given(this.upgradeStrategy.getSupportedExtensions(this.request)).willReturn(Arrays.asList(extension1));

    this.servletRequest.setMethod("GET");
View Full Code Here

  }

  private List<WebSocketExtension> getWebSocketExtensions() {
    List<WebSocketExtension> result = new ArrayList<WebSocketExtension>();
    for (String name : this.factory.getExtensionFactory().getExtensionNames()) {
      result.add(new WebSocketExtension(name));
    }
    return result;
  }
View Full Code Here

TOP

Related Classes of org.springframework.web.socket.WebSocketExtension

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.