org.rhq.enterprise.server.rest
Class SetCallerInterceptor

java.lang.Object
  extended by org.rhq.enterprise.server.rest.SetCallerInterceptor

public class SetCallerInterceptor
extends Object

Interceptor to set the 'caller' variable of the AbstractRestBean from the princpial that was passed in from the WEB tier. For this to work, classes need to

Author:
Heiko W. Rupp

Constructor Summary
SetCallerInterceptor()
           
 
Method Summary
 Object setCaller(javax.interceptor.InvocationContext ctx)
          We need to take the Principal that was passed through the web-integration, get an RHQ Subject and set a session for it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetCallerInterceptor

public SetCallerInterceptor()
Method Detail

setCaller

public Object setCaller(javax.interceptor.InvocationContext ctx)
                 throws Exception
We need to take the Principal that was passed through the web-integration, get an RHQ Subject and set a session for it. When the call was made, we need to invalidate the session again.

Parameters:
ctx - InvocationContext from the EJB invocation chain
Returns:
result of the method call
Throws:
Exception - from method call or if no (valid) principal was provided


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.