List of usage examples for org.springframework.security.messaging.access.expression MessageExpressionVoter setExpressionHandler
public void setExpressionHandler(SecurityExpressionHandler<Message<T>> expressionHandler)
From source file:com.northstrat.springsecurity.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer.java
@Bean public ChannelSecurityInterceptor inboundChannelSecurity() { ChannelSecurityInterceptor channelSecurityInterceptor = new ChannelSecurityInterceptor( inboundMessageSecurityMetadataSource()); MessageExpressionVoter<Object> voter = new MessageExpressionVoter<Object>(); if (expressionHandler != null) { voter.setExpressionHandler(expressionHandler); }/*from www . j a v a 2s. co m*/ List<AccessDecisionVoter> voters = new ArrayList<AccessDecisionVoter>(); voters.add(voter); AffirmativeBased manager = new AffirmativeBased(voters); channelSecurityInterceptor.setAccessDecisionManager(manager); return channelSecurityInterceptor; }