Java Code Examples for org.springframework.web.socket.config.annotation.StompEndpointRegistry#addEndpoint()

The following examples show how to use org.springframework.web.socket.config.annotation.StompEndpointRegistry#addEndpoint() . 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: WebSocketConfig.java    From demo-projects with MIT License 6 votes vote down vote up
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    /*
     * This configures a STOMP (Simple Text Oriented Messaging Protocol)
     * endpoint for our websocket to be hosted on
     */
    registry.addEndpoint("/websocket");
    /*
     * This configures an endpoint with a fallback for SockJS in case the
     * client (an old browser) doesn't support WebSockets natively
     */
    registry.addEndpoint("/sockjs")
            .withSockJS();
}
 
Example 2
Source File: WebSocketConfig.java    From spring-boot-websocket-client with MIT License 4 votes vote down vote up
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    registry.addEndpoint("/hello");
}
 
Example 3
Source File: WebSocketConfig.java    From glowroot with Apache License 2.0 4 votes vote down vote up
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    registry.addEndpoint("/websocket");
}
 
Example 4
Source File: WebSocketConfig.java    From glowroot with Apache License 2.0 4 votes vote down vote up
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    registry.addEndpoint("/websocket");
}
 
Example 5
Source File: WebSocketMessageBrokerConfig.java    From tutorials with MIT License 4 votes vote down vote up
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    registry.addEndpoint("/ws");
}
 
Example 6
Source File: WebSocketConfig.java    From tutorials with MIT License 4 votes vote down vote up
@Override
public void registerStompEndpoints(final StompEndpointRegistry registry) {
    registry.addEndpoint("/chat");
    registry.addEndpoint("/chat").withSockJS();
}
 
Example 7
Source File: Spring4WebSocketExamplesApplication.java    From spring4ws-demos with Apache License 2.0 4 votes vote down vote up
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
	registry.addEndpoint("/stomp");
	registry.addEndpoint("/sockjs").setAllowedOrigins("*").setAllowedOrigins("*").withSockJS();
}