예제 #1
0
  @Override
  public Extension getExtensionResponse() {
    Extension result = new WsExtension(NAME);

    List<Extension.Parameter> params = result.getParameters();

    if (!serverContextTakeover) {
      params.add(new WsExtensionParameter(SERVER_NO_CONTEXT_TAKEOVER, null));
    }
    if (serverMaxWindowBits != -1) {
      params.add(
          new WsExtensionParameter(SERVER_MAX_WINDOW_BITS, Integer.toString(serverMaxWindowBits)));
    }
    if (!clientContextTakeover) {
      params.add(new WsExtensionParameter(CLIENT_NO_CONTEXT_TAKEOVER, null));
    }
    if (clientMaxWindowBits != -1) {
      params.add(
          new WsExtensionParameter(CLIENT_MAX_WINDOW_BITS, Integer.toString(clientMaxWindowBits)));
    }

    return result;
  }
 public JsrExtensionConfig(Extension ext) {
   super(ext.getName());
   for (Extension.Parameter param : ext.getParameters()) {
     this.setParameter(param.getName(), param.getValue());
   }
 }