org.springframework.integration.security.channel
Class SecurityEnforcingChannelInterceptor

java.lang.Object
  extended by org.springframework.integration.channel.interceptor.ChannelInterceptorAdapter
      extended by org.springframework.integration.security.channel.SecurityEnforcingChannelInterceptor
All Implemented Interfaces:
ChannelInterceptor

public class SecurityEnforcingChannelInterceptor
extends ChannelInterceptorAdapter

Delegates to the provided instance of AccessDecisionManager to enforce the security on the send and receive calls of the MessageChannel.

Author:
Jonas Partner, Mark Fisher

Field Summary
private  org.springframework.security.AccessDecisionManager accessDecisionManger
           
private  org.springframework.security.ConfigAttributeDefinition receiveSecurityAttributes
           
private  org.springframework.security.ConfigAttributeDefinition sendSecurityAttributes
           
 
Constructor Summary
SecurityEnforcingChannelInterceptor(org.springframework.security.AccessDecisionManager accessDecisionManager)
           
 
Method Summary
private  void checkPermission(MessageChannel messageChannel, org.springframework.security.ConfigAttributeDefinition securityAttributes)
           
private  void checkReceive(MessageChannel channel)
           
private  void checkSend(MessageChannel channel)
           
 org.springframework.security.ConfigAttributeDefinition getReceiveSecurityAttributes()
           
 org.springframework.security.ConfigAttributeDefinition getSendSecurityAttributes()
           
 boolean preReceive(MessageChannel channel)
           
 Message<?> preSend(Message<?> message, MessageChannel channel)
           
 void setReceiveSecurityAttributes(org.springframework.security.ConfigAttributeDefinition receiveSecurityAttributes)
           
 void setSendSecurityAttributes(org.springframework.security.ConfigAttributeDefinition sendSecurityAttributes)
           
 
Methods inherited from class org.springframework.integration.channel.interceptor.ChannelInterceptorAdapter
postReceive, postSend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

accessDecisionManger

private final org.springframework.security.AccessDecisionManager accessDecisionManger

sendSecurityAttributes

private volatile org.springframework.security.ConfigAttributeDefinition sendSecurityAttributes

receiveSecurityAttributes

private volatile org.springframework.security.ConfigAttributeDefinition receiveSecurityAttributes
Constructor Detail

SecurityEnforcingChannelInterceptor

public SecurityEnforcingChannelInterceptor(org.springframework.security.AccessDecisionManager accessDecisionManager)
Method Detail

getSendSecurityAttributes

public org.springframework.security.ConfigAttributeDefinition getSendSecurityAttributes()

setSendSecurityAttributes

public void setSendSecurityAttributes(org.springframework.security.ConfigAttributeDefinition sendSecurityAttributes)

getReceiveSecurityAttributes

public org.springframework.security.ConfigAttributeDefinition getReceiveSecurityAttributes()

setReceiveSecurityAttributes

public void setReceiveSecurityAttributes(org.springframework.security.ConfigAttributeDefinition receiveSecurityAttributes)

preSend

public Message<?> preSend(Message<?> message,
                          MessageChannel channel)
Specified by:
preSend in interface ChannelInterceptor
Overrides:
preSend in class ChannelInterceptorAdapter

preReceive

public boolean preReceive(MessageChannel channel)
Specified by:
preReceive in interface ChannelInterceptor
Overrides:
preReceive in class ChannelInterceptorAdapter

checkSend

private void checkSend(MessageChannel channel)

checkReceive

private void checkReceive(MessageChannel channel)

checkPermission

private void checkPermission(MessageChannel messageChannel,
                             org.springframework.security.ConfigAttributeDefinition securityAttributes)