List<WebSocketExtension> extensions = negotiation.getSupportedExtensions();
if (extensions != null && !extensions.isEmpty()) {
StringBuilder sb = new StringBuilder();
Iterator<WebSocketExtension> it = extensions.iterator();
while (it.hasNext()) {
WebSocketExtension next = it.next();
sb.append(next);
for (WebSocketExtension.Parameter param : next.getParameters()) {
sb.append("; ");
sb.append(param.getName());
sb.append("=");
sb.append(param.getValue());
}