forked from spring-projects/spring-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The addition of SubProtocolCapable simplifies configuration since it is no longer necessary to explicitly configure DefaultHandshakeHandler with a list of supported sub-protocols. We will not also check if the WebSocketHandler to use for the WebSocket request is an instance of SubProtocolCapable and obtain the list of sub-protocols that way. The provided SubProtocolWebSocketHandler does implement this interface. Issue: SPR-11111
- Loading branch information
1 parent
59002f2
commit 4e82416
Showing
7 changed files
with
161 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...ng-websocket/src/main/java/org/springframework/web/socket/support/SubProtocolCapable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.springframework.web.socket.support; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* An interface for WebSocket handlers that support sub-protocols as defined in RFC 6455. | ||
* | ||
* @author Rossen Stoyanchev | ||
* @since 4.0 | ||
* | ||
* @see <a href="http://tools.ietf.org/html/rfc6455#section-1.9">RFC-6455 section 1.9</a> | ||
*/ | ||
public interface SubProtocolCapable { | ||
|
||
/** | ||
* Return the list of supported sub-protocols. | ||
*/ | ||
List<String> getSubProtocols(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.