Class MessageMatcherDelegatingAuthorizationManager.Builder
java.lang.Object
org.springframework.security.messaging.access.intercept.MessageMatcherDelegatingAuthorizationManager.Builder
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
- Enclosing class:
- MessageMatcherDelegatingAuthorizationManager
public static final class MessageMatcherDelegatingAuthorizationManager.Builder
extends Object
implements org.springframework.context.ApplicationContextAware
A builder for
MessageMatcherDelegatingAuthorizationManager.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal classRepresents the security constraint to be applied to theMessageMatcherinstances. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMaps anyMessageto a security expression.AuthorizationManager<org.springframework.messaging.Message<?>>build()matchers(MessageMatcher<?>... matchers) Maps aListofMessageMatcherinstances to a security expression.Maps anyMessagethat has a null SimpMessageHeaderAccessor destination header (i.e.voidsetApplicationContext(org.springframework.context.ApplicationContext context) simpDestMatchers(String... patterns) simpMessageDestMatchers(String... patterns) simpSubscribeDestMatchers(String... patterns) simpTypeMatchers(org.springframework.messaging.simp.SimpMessageType... typesToMatch) Maps aListofSimpMessageTypeMatcherinstances.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
anyMessage
Maps anyMessageto a security expression.- Returns:
- the Expression to associate
-
nullDestMatcher
Maps anyMessagethat has a null SimpMessageHeaderAccessor destination header (i.e. CONNECT, CONNECT_ACK, HEARTBEAT, UNSUBSCRIBE, DISCONNECT, DISCONNECT_ACK, OTHER)- Returns:
- the Expression to associate
-
simpTypeMatchers
public MessageMatcherDelegatingAuthorizationManager.Builder.Constraint simpTypeMatchers(org.springframework.messaging.simp.SimpMessageType... typesToMatch) Maps aListofSimpMessageTypeMatcherinstances.- Parameters:
typesToMatch- theSimpMessageTypeinstance to match on- Returns:
- the
MessageMatcherDelegatingAuthorizationManager.Builder.Constraintassociated to the matchers.
-
simpDestMatchers
public MessageMatcherDelegatingAuthorizationManager.Builder.Constraint simpDestMatchers(String... patterns) Maps aListofPathPatternMessageMatchers instances without regard to theSimpMessageType. If no destination is found on the Message, then the Matcher returns false.- Parameters:
patterns- the patterns to createMessageMatchers from.
-
simpMessageDestMatchers
public MessageMatcherDelegatingAuthorizationManager.Builder.Constraint simpMessageDestMatchers(String... patterns) Maps aListofPathPatternMessageMatchers instances that match onSimpMessageType.MESSAGE. If no destination is found on the Message, then the Matcher returns false.- Parameters:
patterns- the patterns to createMessageMatchers from.
-
simpSubscribeDestMatchers
public MessageMatcherDelegatingAuthorizationManager.Builder.Constraint simpSubscribeDestMatchers(String... patterns) Maps aListofPathPatternMessageMatchers instances that match onSimpMessageType.SUBSCRIBE. If no destination is found on the Message, then the Matcher returns false.- Parameters:
patterns- the patterns to createMessageMatchers from.
-
matchers
public MessageMatcherDelegatingAuthorizationManager.Builder.Constraint matchers(MessageMatcher<?>... matchers) Maps aListofMessageMatcherinstances to a security expression.- Parameters:
matchers- theMessageMatcherinstances to map.- Returns:
- The
MessageMatcherDelegatingAuthorizationManager.Builder.Constraintthat is associated to theMessageMatcherinstances
-
build
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext context) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-