Class 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 AbstractSecurityInterceptor
    implements org.springframework.messaging.support.ChannelInterceptor
    Performs security handling of Message resources via a ChannelInterceptor implementation.

    The SecurityMetadataSource required by this security interceptor is of type MessageSecurityMetadataSource.

    Refer to AbstractSecurityInterceptor for details on the workflow.

    Since:
    4.0
    • Method Detail

      • getSecureObjectClass

        public java.lang.Class<?> getSecureObjectClass()
        Description copied from class: AbstractSecurityInterceptor
        Indicates the type of secure objects the subclass will be presenting to the abstract parent for processing. This is used to ensure collaborators wired to the AbstractSecurityInterceptor all support the indicated secure object class.
        Specified by:
        getSecureObjectClass in class AbstractSecurityInterceptor
        Returns:
        the type of secure object the subclass provides services for
      • preSend

        public org.springframework.messaging.Message<?> preSend​(org.springframework.messaging.Message<?> message,
                                                                org.springframework.messaging.MessageChannel channel)
        Specified by:
        preSend in interface org.springframework.messaging.support.ChannelInterceptor
      • postSend

        public void postSend​(org.springframework.messaging.Message<?> message,
                             org.springframework.messaging.MessageChannel channel,
                             boolean sent)
        Specified by:
        postSend in interface org.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:
        afterSendCompletion in interface org.springframework.messaging.support.ChannelInterceptor
      • preReceive

        public boolean preReceive​(org.springframework.messaging.MessageChannel channel)
        Specified by:
        preReceive in interface org.springframework.messaging.support.ChannelInterceptor
      • postReceive

        public org.springframework.messaging.Message<?> postReceive​(org.springframework.messaging.Message<?> message,
                                                                    org.springframework.messaging.MessageChannel channel)
        Specified by:
        postReceive in interface org.springframework.messaging.support.ChannelInterceptor
      • afterReceiveCompletion

        public void afterReceiveCompletion​(org.springframework.messaging.Message<?> message,
                                           org.springframework.messaging.MessageChannel channel,
                                           java.lang.Exception ex)
        Specified by:
        afterReceiveCompletion in interface org.springframework.messaging.support.ChannelInterceptor