Java Code Examples for org.springframework.messaging.simp.config.ChannelRegistration#interceptors()

The following examples show how to use org.springframework.messaging.simp.config.ChannelRegistration#interceptors() . 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 spring-boot-start-current with Apache License 2.0 5 votes vote down vote up
/**
 * 通道
 *
 * @param registration
 */
@Override
public void configureClientInboundChannel ( ChannelRegistration registration ) {
	if ( Objects.nonNull( channelInterceptor ) ) {
		registration.interceptors( channelInterceptor );
	}

}
 
Example 2
Source File: WebSocketConfig.java    From tutorial with MIT License 4 votes vote down vote up
@Override
public void configureClientInboundChannel(ChannelRegistration registration) {
    // 注册一个自定义的拦截器
    registration.interceptors(new MyChannelInterceptorAdapter());
}
 
Example 3
Source File: WebSocketAuthenticationSecurityConfig.java    From joal with Apache License 2.0 4 votes vote down vote up
@Override
public void configureClientInboundChannel(final ChannelRegistration registration) {
    registration.interceptors(this.createChannelInterceptors());
}
 
Example 4
Source File: AuthChannelInterceptorAdapterWebAppTest.java    From joal with Apache License 2.0 4 votes vote down vote up
@Override
public void configureClientInboundChannel(final ChannelRegistration registration) {
    registration.interceptors(this.authChannelInterceptorAdapter);
}
 
Example 5
Source File: AbstractSessionWebSocketMessageBrokerConfigurer.java    From spring-session with Apache License 2.0 4 votes vote down vote up
@Override
public void configureClientInboundChannel(ChannelRegistration registration) {
	registration.interceptors(sessionRepositoryInterceptor());
}
 
Example 6
Source File: WebSocketConfig.java    From xechat with MIT License 2 votes vote down vote up
/**
 * 注册消息拦截器
 *
 * @param registration
 */
@Override
public void configureClientInboundChannel(ChannelRegistration registration) {
    registration.interceptors(webSocketInterceptor);
}