Class ChannelSecurityInterceptor
- java.lang.Object
-
- org.springframework.security.access.intercept.AbstractSecurityInterceptor
-
- org.springframework.security.messaging.access.intercept.ChannelSecurityInterceptor
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationEventPublisherAware,org.springframework.context.MessageSourceAware,org.springframework.messaging.support.ChannelInterceptor
public final class ChannelSecurityInterceptor extends org.springframework.security.access.intercept.AbstractSecurityInterceptor implements org.springframework.messaging.support.ChannelInterceptorPerforms security handling of Message resources via a ChannelInterceptor implementation.The
SecurityMetadataSourcerequired by this security interceptor is of typeMessageSecurityMetadataSource.Refer to
AbstractSecurityInterceptorfor details on the workflow.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description ChannelSecurityInterceptor(MessageSecurityMetadataSource metadataSource)Creates a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterReceiveCompletion(org.springframework.messaging.Message<?> message, org.springframework.messaging.MessageChannel channel, java.lang.Exception ex)voidafterSendCompletion(org.springframework.messaging.Message<?> message, org.springframework.messaging.MessageChannel channel, boolean sent, java.lang.Exception ex)java.lang.Class<?>getSecureObjectClass()org.springframework.security.access.SecurityMetadataSourceobtainSecurityMetadataSource()org.springframework.messaging.Message<?>postReceive(org.springframework.messaging.Message<?> message, org.springframework.messaging.MessageChannel channel)voidpostSend(org.springframework.messaging.Message<?> message, org.springframework.messaging.MessageChannel channel, boolean sent)booleanpreReceive(org.springframework.messaging.MessageChannel channel)org.springframework.messaging.Message<?>preSend(org.springframework.messaging.Message<?> message, org.springframework.messaging.MessageChannel channel)-
Methods inherited from class org.springframework.security.access.intercept.AbstractSecurityInterceptor
afterInvocation, afterPropertiesSet, beforeInvocation, finallyInvocation, getAccessDecisionManager, getAfterInvocationManager, getAuthenticationManager, getRunAsManager, isAlwaysReauthenticate, isRejectPublicInvocations, isValidateConfigAttributes, setAccessDecisionManager, setAfterInvocationManager, setAlwaysReauthenticate, setApplicationEventPublisher, setAuthenticationManager, setMessageSource, setPublishAuthorizationSuccess, setRejectPublicInvocations, setRunAsManager, setValidateConfigAttributes
-
-
-
-
Constructor Detail
-
ChannelSecurityInterceptor
public ChannelSecurityInterceptor(MessageSecurityMetadataSource metadataSource)
Creates a new instance- Parameters:
metadataSource- the MessageSecurityMetadataSource to use. Cannot be null.- See Also:
DefaultMessageSecurityMetadataSource,ExpressionBasedMessageSecurityMetadataSourceFactory
-
-
Method Detail
-
getSecureObjectClass
public java.lang.Class<?> getSecureObjectClass()
- Specified by:
getSecureObjectClassin classorg.springframework.security.access.intercept.AbstractSecurityInterceptor
-
obtainSecurityMetadataSource
public org.springframework.security.access.SecurityMetadataSource obtainSecurityMetadataSource()
- Specified by:
obtainSecurityMetadataSourcein classorg.springframework.security.access.intercept.AbstractSecurityInterceptor
-
preSend
public org.springframework.messaging.Message<?> preSend(org.springframework.messaging.Message<?> message, org.springframework.messaging.MessageChannel channel)- Specified by:
preSendin interfaceorg.springframework.messaging.support.ChannelInterceptor
-
postSend
public void postSend(org.springframework.messaging.Message<?> message, org.springframework.messaging.MessageChannel channel, boolean sent)- Specified by:
postSendin interfaceorg.springframework.messaging.support.ChannelInterceptor
-
afterSendCompletion
public void afterSendCompletion(org.springframework.messaging.Message<?> message, org.springframework.messaging.MessageChannel channel, boolean sent, java.lang.Exception ex)- Specified by:
afterSendCompletionin interfaceorg.springframework.messaging.support.ChannelInterceptor
-
preReceive
public boolean preReceive(org.springframework.messaging.MessageChannel channel)
- Specified by:
preReceivein interfaceorg.springframework.messaging.support.ChannelInterceptor
-
postReceive
public org.springframework.messaging.Message<?> postReceive(org.springframework.messaging.Message<?> message, org.springframework.messaging.MessageChannel channel)- Specified by:
postReceivein interfaceorg.springframework.messaging.support.ChannelInterceptor
-
afterReceiveCompletion
public void afterReceiveCompletion(org.springframework.messaging.Message<?> message, org.springframework.messaging.MessageChannel channel, java.lang.Exception ex)- Specified by:
afterReceiveCompletionin interfaceorg.springframework.messaging.support.ChannelInterceptor
-
-