Java 类org.springframework.web.socket.config.annotation.StompEndpointRegistry 实例源码

项目:spring4-understanding    文件:WebSocketStompClientIntegrationTests.java   
@Override
protected void registerStompEndpoints(StompEndpointRegistry registry) {
    // Can't rely on classpath detection
    RequestUpgradeStrategy upgradeStrategy = new TomcatRequestUpgradeStrategy();
    registry.addEndpoint("/stomp")
            .setHandshakeHandler(new DefaultHandshakeHandler(upgradeStrategy))
            .setAllowedOrigins("*");
}
项目:cloudstreetmarket.com    文件:WebSocketConfig.java   
@Override
protected void configureStompEndpoints(StompEndpointRegistry registry) {
       registry.addEndpoint(ACTIVITY_FEED_ENDPOINT)
        .setAllowedOrigins(protocol.concat(realmName))
        .withSockJS()
        .setStreamBytesLimit(512 * 1024)
           .setHttpMessageCacheSize(1000)
           .setDisconnectDelay(30 * 1000);

    registry.addEndpoint(PRIVATE_STOCKS_ENDPOINT)
        .setAllowedOrigins(protocol.concat(realmName))
        .withSockJS()
        .setStreamBytesLimit(512 * 1024)
           .setHttpMessageCacheSize(1000)
           .setDisconnectDelay(30 * 1000);
}
项目:xm-gate    文件:WebsocketConfiguration.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    String[] allowedOrigins = Optional.ofNullable(jHipsterProperties.getCors().getAllowedOrigins()).map(origins -> origins.toArray(new String[0])).orElse(new String[0]);
    registry.addEndpoint("/websocket/tracker")
        .setHandshakeHandler(defaultHandshakeHandler())
        .setAllowedOrigins(allowedOrigins)
        .withSockJS()
        .setInterceptors(httpSessionHandshakeInterceptor());
}
项目:spring-boot-start-current    文件:WebSocketConfig.java   
/**
 * 配置端点注册中心,接收客户端的连接
 *
 * @param registry 端点注册中心
 */
@Override
public void registerStompEndpoints ( StompEndpointRegistry registry ) {
    /* 在指定的映射路径上为Web套接字端点注册一个STOMP. */
    // 表示添加了一个 /aidijing 端点,客户端就可以通过这个端点来进行连接.
    // aidijing
    registry.addEndpoint( stompEndpointsPaths )
            .withSockJS(); // 开启SockJS支持
}
项目:spring-cloud-netflix-zuul-websocket    文件:ZuulWebSocketConfiguration.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    boolean wsEnabled = false;
    for (Map.Entry<String, ZuulWebSocketProperties.WsBrokerage> entry : zuulWebSocketProperties
            .getBrokerages().entrySet()) {
        ZuulWebSocketProperties.WsBrokerage wsBrokerage = entry.getValue();
        if (wsBrokerage.isEnabled()) {
            this.addStompEndpoint(registry, wsBrokerage.getEndPoints());
            wsEnabled = true;
        }
    }

    if (!wsEnabled)
        this.addStompEndpoint(registry, UUID.randomUUID().toString());
}
项目:WebIDE-Backend    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    registry.addEndpoint("/sockjs")
            .addInterceptors(new SpaceKeyHandshakeInterceptor())
            .setAllowedOrigins(allowedOrigins)
            .withSockJS();
}
项目:metasfresh-webui-api    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(final StompEndpointRegistry registry)
{
    // the endpoint for websocket connections
    registry.addEndpoint(ENDPOINT)
            .setAllowedOrigins("*") // FIXME: for now we allow any origin
            .addInterceptors(new WebSocketHandshakeInterceptor())
            .withSockJS()
    //
    ;
}
项目:seven-wonders    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    registry.addEndpoint("/seven-wonders-websocket")
            .setHandshakeHandler(handshakeHandler())
            .setAllowedOrigins("http://localhost:3000") // to allow frontend server proxy requests in dev mode
            .withSockJS();
}
项目:aws-kinesis-zombies    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    // Utiliza este endpoint para connectar desde el navegador
    registry
        .setErrorHandler(new ErrorHandler())
        .addEndpoint("/stomp").withSockJS();

}
项目:metadatamanagement    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
  registry.addEndpoint("/websocket").setAllowedOrigins(
      properties.getWebsockets().getAllowedOrigins().toArray(new String[0])).withSockJS()
      .setSessionCookieNeeded(false)
      .setClientLibraryUrl("/bower_components/sockjs-client/dist/sockjs.min.js")
      .setInterceptors(websocketHandshakeInterceptor());
}
项目:vidada-server    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    registry
        .addEndpoint("/stomp")
        .setAllowedOrigins("*")
        .withSockJS()
    ;
}
项目:sdcct    文件:SdcctWebSocketMessageBrokerConfiguration.java   
@Override
protected void registerStompEndpoints(StompEndpointRegistry stompEndpointRegistry) {
    stompEndpointRegistry.addEndpoint(SdcctWebSocketPaths.TESTCASES_IHE_RESULTS)
        .setHandshakeHandler(new DefaultHandshakeHandler(new TomcatRequestUpgradeStrategy())).addInterceptors(new HttpSessionHandshakeInterceptor())
        .withSockJS().setClientLibraryUrl(this.sockJsClientLibUrl).setDisconnectDelay(this.sockJsDisconnectDelay).setHeartbeatTime(this.sockJsHeartbeatTime)
        .setHttpMessageCacheSize(this.sockJsHttpMsgCacheSize).setMessageCodec(new Jackson2SockJsMessageCodec(this.objMapper))
        .setStreamBytesLimit(this.sockJsStreamLimit);
}
项目:the-turbine    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(final StompEndpointRegistry registry) {
  this.registry = registry;
  String atacamaInGulpServeMode = "http://localhost:3000"; 
  String inProcessWebsite = "http://localhost:48002"; 
  registry.addEndpoint("/reply").setAllowedOrigins(atacamaInGulpServeMode, inProcessWebsite).withSockJS();
  registry.addEndpoint("/request").setAllowedOrigins(atacamaInGulpServeMode, inProcessWebsite).withSockJS();
  registry.addEndpoint("/ping").setAllowedOrigins(atacamaInGulpServeMode, inProcessWebsite).withSockJS();
  registry.addEndpoint("/ticks").setAllowedOrigins(atacamaInGulpServeMode, inProcessWebsite).withSockJS();
}
项目:appverse-server    文件:FrontFacadeWebSocketSecurityAutoConfiguration.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry stompEndpointRegistry) {

    logger.info("Initializing websocket standard on path:'{}' ...", defaultWebsocketEndpointPath);
    StompWebSocketEndpointRegistration webSockedEndpoint  = stompEndpointRegistry.addEndpoint(defaultWebsocketEndpointPath);
    logger.info("Initializing websocket sockJs on path:'{}' ...", defaultSockJsEndpointPath);
    StompWebSocketEndpointRegistration sockJsEndpoint = stompEndpointRegistry.addEndpoint(defaultSockJsEndpointPath);
    sockJsEndpoint.withSockJS();
    if (Boolean.valueOf(corsEnabled)){
        logger.info("Initializing cors on websockets");
        webSockedEndpoint.setAllowedOrigins(StringUtils.commaDelimitedListToStringArray(allowedOrigins));
        sockJsEndpoint.setAllowedOrigins(StringUtils.commaDelimitedListToStringArray(allowedOrigins));
    }
}
项目:appverse-server    文件:FrontFacadeWebSocketAutoConfiguration.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry stompEndpointRegistry) {

    logger.info("Initializing websocket standard on path:'{}' ...", defaultWebsocketEndpointPath);
    StompWebSocketEndpointRegistration webSockedEndpoint  = stompEndpointRegistry.addEndpoint(defaultWebsocketEndpointPath);
    logger.info("Initializing websocket sockJs on path:'{}' ...", defaultSockJsEndpointPath);
    StompWebSocketEndpointRegistration sockJsEndpoint = stompEndpointRegistry.addEndpoint(defaultSockJsEndpointPath);
    sockJsEndpoint.withSockJS();
    if (Boolean.valueOf(corsEnabled)){
        logger.info("Initializing cors on websockets");
        webSockedEndpoint.setAllowedOrigins(StringUtils.commaDelimitedListToStringArray(allowedOrigins));
        sockJsEndpoint.setAllowedOrigins(StringUtils.commaDelimitedListToStringArray(allowedOrigins));
    }
}
项目:spring-session    文件:AbstractSessionWebSocketMessageBrokerConfigurer.java   
@Override
public final void registerStompEndpoints(StompEndpointRegistry registry) {
    if (registry instanceof WebMvcStompEndpointRegistry) {
        WebMvcStompEndpointRegistry mvcRegistry = (WebMvcStompEndpointRegistry) registry;
        configureStompEndpoints(new SessionStompEndpointRegistry(mvcRegistry,
                sessionRepositoryInterceptor()));
    }
}
项目:bearchoke    文件:WebSocketConfig.java   
@Override
public void configureStompEndpoints(StompEndpointRegistry registry) {
    log.info("WebSocket config: Allowing only origins: " + environment.getProperty("allowed.origin"));
    registry.addEndpoint("/ws").setAllowedOrigins(environment.getProperty("allowed.origin")).setHandshakeHandler(new SecureHandshakeHandler(preAuthAuthenticationManager))
            .withSockJS()
            .setStreamBytesLimit(512 * 1024)
            .setHttpMessageCacheSize(1000)
            .setDisconnectDelay(30 * 1000)
            .setInterceptors(new HttpSessionIdHandshakeInterceptor())
    ;
}
项目:generator-jhipster    文件:_WebsocketConfiguration.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    String[] allowedOrigins = Optional.ofNullable(jHipsterProperties.getCors().getAllowedOrigins()).map(origins -> origins.toArray(new String[0])).orElse(new String[0]);
    registry.addEndpoint("/websocket/tracker")
        .setHandshakeHandler(defaultHandshakeHandler())
        .setAllowedOrigins(allowedOrigins)
        .withSockJS()
        .setInterceptors(httpSessionHandshakeInterceptor());
}
项目:cas-5.1.0    文件:CasReportsConfiguration.java   
@Override
public void registerStompEndpoints(final StompEndpointRegistry registry) {
    registry.addEndpoint("/logoutput")
            .addInterceptors(new HttpSessionHandshakeInterceptor())
            .withSockJS();
}
项目:java_springboot    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    //使用SockJS协议
    registry.addEndpoint("/endpointshuaishuai").withSockJS();
    registry.addEndpoint("/endpointChat").withSockJS();
}
项目:spring-boot-websocket-client    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    registry.addEndpoint("/hello");
}
项目:VS2Labor    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    registry.addEndpoint("/socket");
    registry.addEndpoint("/socket").withSockJS();
}
项目:JavaQuarkBBS    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry stompEndpointRegistry) {
    stompEndpointRegistry.addEndpoint("/quarkServer").setAllowedOrigins("*").withSockJS();//stomp节点
}
项目:emergentmud    文件:WebSocketConfiguration.java   
@Override
public void configureStompEndpoints(StompEndpointRegistry stompEndpointRegistry) {
    stompEndpointRegistry.addEndpoint("/mud").withSockJS();
}
项目:logger    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    registry.addEndpoint("/logger-app").setAllowedOrigins("*").withSockJS();
}
项目:eventsourcing-examples    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    registry.addEndpoint("/subscribe").setAllowedOrigins("*");
    registry.addEndpoint("/subscribe").setAllowedOrigins("*").withSockJS();
}
项目:kafka-streams-api-websockets    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    registry.addEndpoint(endpoint).withSockJS();
}
项目:maildump    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    registry.addEndpoint("/maildump").withSockJS();
}
项目:OutsourcedProject    文件:WebSocketConfig.java   
/**
 * 这个方法的作用是添加一个服务端点,来接收客户端的连接。
 *
 * @param stompEndpointRegistry StompEndpointRegistry
 */
@Override
public void registerStompEndpoints(StompEndpointRegistry stompEndpointRegistry) {
    //表示添加了一个/socket端点,客户端就可以通过这个端点来进行连接。
    stompEndpointRegistry.addEndpoint("/socket").withSockJS();
}
项目:Food_Ordering_System    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry stompEndpointRegistry) {
    stompEndpointRegistry.addEndpoint("/stomp").setAllowedOrigins("*").withSockJS();
}
项目:java-microservice    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    //no withSockJS() if not working with js
    registry.addEndpoint("/socket-todos").setAllowedOrigins("*").withSockJS();
}
项目:Taroco    文件:WebSocketConfiguration.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    registry.addEndpoint("/company").withSockJS();
}
项目:tdd-pingpong    文件:WebSocketSecurityConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
  registry.addEndpoint("/websocket").withSockJS();
}
项目:JRockets    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry stompEndpointRegistry) {
    stompEndpointRegistry.addEndpoint("/commentStream", "/postStream").withSockJS();
}
项目:kafka-webview    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(final StompEndpointRegistry registry) {
    registry
        .addEndpoint("/websocket")
        .withSockJS();
}
项目:spring-boot-slingshot    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
   registry.addEndpoint("/spring-boot-slingshot")
           .withSockJS();
}
项目:sample.SpringBootWebsocket    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    registry.addEndpoint("/gs-guide-websocket").withSockJS()
            .setClientLibraryUrl("/webjars/sockjs-client/1.0.2/sockjs.min.js");
}
项目:movie-rating-prediction    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
       registry.addEndpoint("/mrp-websocket").withSockJS();
}
项目:uroborosql-springboot-demo    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
    registry.addEndpoint("endpoint")
        .setAllowedOrigins("*");
}
项目:Food-Express    文件:WebSocketConfig.java   
@Override
public void registerStompEndpoints(StompEndpointRegistry stompEndpointRegistry) {
    stompEndpointRegistry.addEndpoint("/stomp").setAllowedOrigins("*").withSockJS();
}