Package org.apache.shiro.spring.remoting
Class SecureRemoteInvocationFactory
- java.lang.Object
-
- org.springframework.remoting.support.DefaultRemoteInvocationFactory
-
- org.apache.shiro.spring.remoting.SecureRemoteInvocationFactory
-
- All Implemented Interfaces:
org.springframework.remoting.support.RemoteInvocationFactory
public class SecureRemoteInvocationFactory extends org.springframework.remoting.support.DefaultRemoteInvocationFactoryARemoteInvocationFactorythat passes the session ID to the server via aRemoteInvocationattribute. This factory is the client-side part of the Shiro Spring remoting invocation. ASecureRemoteInvocationExecutorshould be used to export the server-side remote services to ensure that the appropriate Subject and Session are bound to the remote thread during execution.- Since:
- 0.1
-
-
Field Summary
Fields Modifier and Type Field Description static StringHOST_KEYstatic StringSESSION_ID_KEY
-
Constructor Summary
Constructors Constructor Description SecureRemoteInvocationFactory()SecureRemoteInvocationFactory(String sessionId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.remoting.support.RemoteInvocationcreateRemoteInvocation(org.aopalliance.intercept.MethodInvocation mi)Creates aRemoteInvocationwith the current session ID as anattribute.
-
-
-
Constructor Detail
-
SecureRemoteInvocationFactory
public SecureRemoteInvocationFactory()
-
SecureRemoteInvocationFactory
public SecureRemoteInvocationFactory(String sessionId)
-
-
Method Detail
-
createRemoteInvocation
public org.springframework.remoting.support.RemoteInvocation createRemoteInvocation(org.aopalliance.intercept.MethodInvocation mi)
Creates aRemoteInvocationwith the current session ID as anattribute.- Specified by:
createRemoteInvocationin interfaceorg.springframework.remoting.support.RemoteInvocationFactory- Overrides:
createRemoteInvocationin classorg.springframework.remoting.support.DefaultRemoteInvocationFactory- Parameters:
mi- the method invocation that the remote invocation should be based on.- Returns:
- a remote invocation object containing the current session ID as an attribute.
-
-