Search in sources :

Example 1 with SimpDestinationMessageMatcher

use of org.springframework.security.messaging.util.matcher.SimpDestinationMessageMatcher in project spring-security by spring-projects.

the class MessageSecurityMetadataSourceRegistry method simpTypeMatchers.

/**
	 * Maps a {@link List} of {@link SimpDestinationMessageMatcher} instances.
	 *
	 * @param typesToMatch the {@link SimpMessageType} instance to match on
	 * @return the {@link Constraint} associated to the matchers.
	 */
public Constraint simpTypeMatchers(SimpMessageType... typesToMatch) {
    MessageMatcher<?>[] typeMatchers = new MessageMatcher<?>[typesToMatch.length];
    for (int i = 0; i < typesToMatch.length; i++) {
        SimpMessageType typeToMatch = typesToMatch[i];
        typeMatchers[i] = new SimpMessageTypeMatcher(typeToMatch);
    }
    return matchers(typeMatchers);
}
Also used : MessageMatcher(org.springframework.security.messaging.util.matcher.MessageMatcher) SimpDestinationMessageMatcher(org.springframework.security.messaging.util.matcher.SimpDestinationMessageMatcher) SimpMessageType(org.springframework.messaging.simp.SimpMessageType) SimpMessageTypeMatcher(org.springframework.security.messaging.util.matcher.SimpMessageTypeMatcher)

Aggregations

SimpMessageType (org.springframework.messaging.simp.SimpMessageType)1 MessageMatcher (org.springframework.security.messaging.util.matcher.MessageMatcher)1 SimpDestinationMessageMatcher (org.springframework.security.messaging.util.matcher.SimpDestinationMessageMatcher)1 SimpMessageTypeMatcher (org.springframework.security.messaging.util.matcher.SimpMessageTypeMatcher)1