public String getParameterizedName() { StringBuilder str = new StringBuilder(); str.append(name); for (String param : parameters.keySet()) { str.append(';'); str.append(param); str.append('='); QuoteUtil.quoteIfNeeded(str,parameters.get(param),";="); } return str.toString(); }
public ExtensionConfig(String parameterizedName) { Iterator<String> extListIter = QuoteUtil.splitAt(parameterizedName,";"); this.name = extListIter.next(); this.parameters = new HashMap<>(); // now for parameters while (extListIter.hasNext()) { String extParam = extListIter.next(); Iterator<String> extParamIter = QuoteUtil.splitAt(extParam,"="); String key = extParamIter.next().trim(); String value = null; if (extParamIter.hasNext()) { value = extParamIter.next(); } parameters.put(key,value); } }
@Override public String next() { if (!hasNext()) { throw new NoSuchElementException(); } String ret = token.toString(); token.setLength(0); hasToken = false; return QuoteUtil.dequote(ret.trim()); }
private String getHeaderValue(HandshakeRequest request, String key) { List<String> value = request.getHeaders().get(key); return QuoteUtil.join(value, ","); }
/** * Simple quote of a string, escaping where needed. * * @param buf * the StringBuilder to append to * @param str * the string to quote */ public static void quote(StringBuilder buf, String str) { buf.append('"'); escape(buf,str); buf.append('"'); }
quote(buf,str); return;
LOG.warn("Client requested Subprotocols on endpoint with none supported: {}",QuoteUtil.join(requested,",")); return NO_SUBPROTOCOL; LOG.warn("Client requested subprotocols {} do not match any endpoint supported subprotocols {}",QuoteUtil.join(requested,","), QuoteUtil.join(supported,",")); return NO_SUBPROTOCOL;
/** * Simple quote of a string, escaping where needed. * * @param buf * the StringBuilder to append to * @param str * the string to quote */ public static void quote(StringBuilder buf, String str) { buf.append('"'); escape(buf,str); buf.append('"'); }
quote(buf,str); return;
public String getParameterizedName() { StringBuilder str = new StringBuilder(); str.append(name); for (String param : parameters.keySet()) { str.append(';'); str.append(param); str.append('='); QuoteUtil.quoteIfNeeded(str,parameters.get(param),";="); } return str.toString(); }
public static ExtensionConfig parse(String parameterizedName) { Iterator<String> extListIter = QuoteUtil.splitAt(parameterizedName,";"); String extToken = extListIter.next(); ExtensionConfig ext = new ExtensionConfig(extToken); // now for parameters while (extListIter.hasNext()) { String extParam = extListIter.next(); Iterator<String> extParamIter = QuoteUtil.splitAt(extParam,"="); String key = extParamIter.next().trim(); String value = null; if (extParamIter.hasNext()) { value = extParamIter.next(); } ext.setParameter(key,value); } return ext; }
@Override public String next() { if (!hasNext()) { throw new NoSuchElementException(); } String ret = token.toString(); token.setLength(0); hasToken = false; return QuoteUtil.dequote(ret.trim()); }
String err = String.format("Cannot call method %s on %s with args: %s",method,pojo, QuoteUtil.join(args,",")); throw new WebSocketException(err,e);
/** * Simple quote of a string, escaping where needed. * * @param buf * the StringBuilder to append to * @param str * the string to quote */ public static void quote(StringBuilder buf, String str) { buf.append('"'); escape(buf,str); buf.append('"'); }
quote(buf,str); return;
public final String getParameterizedName() { StringBuilder str = new StringBuilder(); str.append(name); for (String param : parameters.keySet()) { str.append(';'); str.append(param); String value = parameters.get(param); if (value != null) { str.append('='); QuoteUtil.quoteIfNeeded(str,value,";="); } } return str.toString(); }
public static ExtensionConfig parse(String parameterizedName) { Iterator<String> extListIter = QuoteUtil.splitAt(parameterizedName,";"); String extToken = extListIter.next(); ExtensionConfig ext = new ExtensionConfig(extToken); // now for parameters while (extListIter.hasNext()) { String extParam = extListIter.next(); Iterator<String> extParamIter = QuoteUtil.splitAt(extParam,"="); String key = extParamIter.next().trim(); String value = null; if (extParamIter.hasNext()) { value = extParamIter.next(); } ext.setParameter(key,value); } return ext; }