@Retention(value=RUNTIME) @Target(value=TYPE) @Documented @EnableWebSocket @Import(value=ch.rasc.wampspring.config.DelegatingWampConfiguration.class) public @interface EnableWamp
@Configuration class to enable WAMP
support:
@Configuration
@EnableWamp
public class MyAppConfig {
}
Customize the imported configuration by implementing the
WampConfigurer interface:
@Configuration
@EnableWamp
public class MyAppConfig implements WampConfigurer {
@Override
public Executor outboundExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setThreadNamePrefix("WampOutbound-");
executor.initialize();
return executor;
}
@Override
public String wampEndpointPath() {
return "/wamp";
}
}
Or by extending the WampConfigurerAdapter class and overriding only
the methods that need to be different.
@Configuration
@EnableWamp
public class MyAppConfig extends WampConfigurerAdapter {
@Override
public String wampEndpointPath() {
return "/myOwnWampEndpoint";
}
}
Copyright © 2014. All Rights Reserved.