org.springframework.web.socket.adapter.standard.WebSocketToStandardExtensionAdapter Java Examples
The following examples show how to use
org.springframework.web.socket.adapter.standard.WebSocketToStandardExtensionAdapter.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractStandardUpgradeStrategy.java From spring4-understanding with Apache License 2.0 | 6 votes |
@Override public void upgrade(ServerHttpRequest request, ServerHttpResponse response, String selectedProtocol, List<WebSocketExtension> selectedExtensions, Principal user, WebSocketHandler wsHandler, Map<String, Object> attrs) throws HandshakeFailureException { HttpHeaders headers = request.getHeaders(); InetSocketAddress localAddr = request.getLocalAddress(); InetSocketAddress remoteAddr = request.getRemoteAddress(); StandardWebSocketSession session = new StandardWebSocketSession(headers, attrs, localAddr, remoteAddr, user); StandardWebSocketHandlerAdapter endpoint = new StandardWebSocketHandlerAdapter(wsHandler, session); List<Extension> extensions = new ArrayList<Extension>(); for (WebSocketExtension extension : selectedExtensions) { extensions.add(new WebSocketToStandardExtensionAdapter(extension)); } upgradeInternal(request, response, selectedProtocol, extensions, endpoint); }
Example #2
Source File: StandardWebSocketClient.java From spring-analysis-note with MIT License | 5 votes |
private static List<Extension> adaptExtensions(List<WebSocketExtension> extensions) { List<Extension> result = new ArrayList<>(); for (WebSocketExtension extension : extensions) { result.add(new WebSocketToStandardExtensionAdapter(extension)); } return result; }
Example #3
Source File: StandardWebSocketClient.java From java-technology-stack with MIT License | 5 votes |
private static List<Extension> adaptExtensions(List<WebSocketExtension> extensions) { List<Extension> result = new ArrayList<>(); for (WebSocketExtension extension : extensions) { result.add(new WebSocketToStandardExtensionAdapter(extension)); } return result; }
Example #4
Source File: StandardWebSocketClient.java From spring4-understanding with Apache License 2.0 | 5 votes |
private static List<Extension> adaptExtensions(List<WebSocketExtension> extensions) { List<Extension> result = new ArrayList<Extension>(); for (WebSocketExtension extension : extensions) { result.add(new WebSocketToStandardExtensionAdapter(extension)); } return result; }