T
- the message typepublic class EventVoter<T>
extends java.lang.Object
implements org.springframework.security.access.AccessDecisionVoter<org.springframework.messaging.Message<T>>
ConfigAttribute.getAttribute()
starts with a prefix indicating
that it is an event. The default prefix is EVENT
, but
it may be overridden to any value. It may also be set to empty, which means that
essentially any attribute will be voted on. As described further below, the effect
of an empty prefix may not be quite desirable.
All comparisons and prefixes are case sensitive.
Constructor and Description |
---|
EventVoter() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEventPrefix()
Gets the event prefix.
|
boolean |
supports(java.lang.Class<?> clazz) |
boolean |
supports(org.springframework.security.access.ConfigAttribute attribute) |
int |
vote(org.springframework.security.core.Authentication authentication,
org.springframework.messaging.Message<T> event,
java.util.Collection<org.springframework.security.access.ConfigAttribute> attributes) |
public boolean supports(org.springframework.security.access.ConfigAttribute attribute)
supports
in interface org.springframework.security.access.AccessDecisionVoter<org.springframework.messaging.Message<T>>
public boolean supports(java.lang.Class<?> clazz)
supports
in interface org.springframework.security.access.AccessDecisionVoter<org.springframework.messaging.Message<T>>
public int vote(org.springframework.security.core.Authentication authentication, org.springframework.messaging.Message<T> event, java.util.Collection<org.springframework.security.access.ConfigAttribute> attributes)
vote
in interface org.springframework.security.access.AccessDecisionVoter<org.springframework.messaging.Message<T>>
public java.lang.String getEventPrefix()