/** * Returns the value of the {@code Sec-WebSocket-Key} header. * @return the value of the header */ public List<String> getSecWebSocketProtocol() { List<String> values = get(SEC_WEBSOCKET_PROTOCOL); if (CollectionUtils.isEmpty(values)) { return Collections.emptyList(); } else if (values.size() == 1) { return getValuesAsList(SEC_WEBSOCKET_PROTOCOL); } else { return values; } }
/** * Returns the value of the {@code Sec-WebSocket-Key} header. * @return the value of the header */ public List<String> getSecWebSocketProtocol() { List<String> values = get(SEC_WEBSOCKET_PROTOCOL); if (CollectionUtils.isEmpty(values)) { return Collections.emptyList(); } else if (values.size() == 1) { return getValuesAsList(SEC_WEBSOCKET_PROTOCOL); } else { return values; } }
/** * Returns the value of the {@code Sec-WebSocket-Key} header. * @return the value of the header */ public List<String> getSecWebSocketProtocol() { List<String> values = get(SEC_WEBSOCKET_PROTOCOL); if (CollectionUtils.isEmpty(values)) { return Collections.emptyList(); } else if (values.size() == 1) { return getValuesAsList(SEC_WEBSOCKET_PROTOCOL); } else { return values; } }