@Override protected void addSockJsServiceMapping(MultiValueMap<HttpRequestHandler, String> mappings, SockJsService sockJsService, WebSocketHandler handler, String pathPattern) { SockJsHttpRequestHandler httpHandler = new SockJsHttpRequestHandler(sockJsService, handler); mappings.add(httpHandler, pathPattern); }
public final MultiValueMap<HttpRequestHandler, String> getMappings() { MultiValueMap<HttpRequestHandler, String> mappings = new LinkedMultiValueMap<>(); if (this.registration != null) { SockJsService sockJsService = this.registration.getSockJsService(); for (String path : this.paths) { String pattern = (path.endsWith("/") ? path + "**" : path + "/**"); SockJsHttpRequestHandler handler = new SockJsHttpRequestHandler(sockJsService, this.webSocketHandler); mappings.add(handler, pattern); } } else { for (String path : this.paths) { WebSocketHttpRequestHandler handler; if (this.handshakeHandler != null) { handler = new WebSocketHttpRequestHandler(this.webSocketHandler, this.handshakeHandler); } else { handler = new WebSocketHttpRequestHandler(this.webSocketHandler); } HandshakeInterceptor[] interceptors = getInterceptors(); if (interceptors.length > 0) { handler.setHandshakeInterceptors(Arrays.asList(interceptors)); } mappings.add(handler, path); } } return mappings; }
@Override protected void addSockJsServiceMapping(MultiValueMap<HttpRequestHandler, String> mappings, SockJsService sockJsService, WebSocketHandler handler, String pathPattern) { SockJsHttpRequestHandler httpHandler = new SockJsHttpRequestHandler(sockJsService, handler); mappings.add(httpHandler, pathPattern); }
@Override protected void addSockJsServiceMapping(MultiValueMap<HttpRequestHandler, String> mappings, SockJsService sockJsService, WebSocketHandler handler, String pathPattern) { SockJsHttpRequestHandler httpHandler = new SockJsHttpRequestHandler(sockJsService, handler); mappings.add(httpHandler, pathPattern); }
public final MultiValueMap<HttpRequestHandler, String> getMappings() { MultiValueMap<HttpRequestHandler, String> mappings = new LinkedMultiValueMap<>(); if (this.registration != null) { SockJsService sockJsService = this.registration.getSockJsService(); for (String path : this.paths) { String pattern = (path.endsWith("/") ? path + "**" : path + "/**"); SockJsHttpRequestHandler handler = new SockJsHttpRequestHandler(sockJsService, this.webSocketHandler); mappings.add(handler, pattern); } } else { for (String path : this.paths) { WebSocketHttpRequestHandler handler; if (this.handshakeHandler != null) { handler = new WebSocketHttpRequestHandler(this.webSocketHandler, this.handshakeHandler); } else { handler = new WebSocketHttpRequestHandler(this.webSocketHandler); } HandshakeInterceptor[] interceptors = getInterceptors(); if (interceptors.length > 0) { handler.setHandshakeInterceptors(Arrays.asList(interceptors)); } mappings.add(handler, path); } } return mappings; }
public final MultiValueMap<HttpRequestHandler, String> getMappings() { MultiValueMap<HttpRequestHandler, String> mappings = new LinkedMultiValueMap<>(); if (this.registration != null) { SockJsService sockJsService = this.registration.getSockJsService(); for (String path : this.paths) { String pattern = (path.endsWith("/") ? path + "**" : path + "/**"); SockJsHttpRequestHandler handler = new SockJsHttpRequestHandler(sockJsService, this.webSocketHandler); mappings.add(handler, pattern); } } else { for (String path : this.paths) { WebSocketHttpRequestHandler handler; if (this.handshakeHandler != null) { handler = new WebSocketHttpRequestHandler(this.webSocketHandler, this.handshakeHandler); } else { handler = new WebSocketHttpRequestHandler(this.webSocketHandler); } HandshakeInterceptor[] interceptors = getInterceptors(); if (interceptors.length > 0) { handler.setHandshakeInterceptors(Arrays.asList(interceptors)); } mappings.add(handler, path); } } return mappings; }
for (String path : this.paths) { String pattern = path.endsWith("/") ? path + "**" : path + "/**"; SockJsHttpRequestHandler handler = new SockJsHttpRequestHandler( sockJsService, this.webSocketHandler); mappings.add(handler, pattern);