it.eng.spagobi.rest.interceptors
Class TenantRestProcessInterceptor
java.lang.Object
it.eng.spagobi.rest.interceptors.TenantRestProcessInterceptor
- All Implemented Interfaces:
- org.jboss.resteasy.spi.interception.PostProcessInterceptor, org.jboss.resteasy.spi.interception.PreProcessInterceptor
@Provider
public class TenantRestProcessInterceptor
- extends java.lang.Object
- implements org.jboss.resteasy.spi.interception.PreProcessInterceptor, org.jboss.resteasy.spi.interception.PostProcessInterceptor
The org.jboss.resteasy.spi.interception.PreProcessInterceptor runs after a JAX-RS resource
method is found to invoke on, but before the actual invocation happens
- Author:
- Davide Zerbetto (davide.zerbetto@eng.it)
Method Summary |
void |
postProcess(org.jboss.resteasy.core.ServerResponse response)
Post-processes all the REST requests. |
org.jboss.resteasy.core.ServerResponse |
preProcess(org.jboss.resteasy.spi.HttpRequest request,
org.jboss.resteasy.core.ResourceMethod resourceMethod)
Pre-processes all the REST requests. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TenantRestProcessInterceptor
public TenantRestProcessInterceptor()
preProcess
public org.jboss.resteasy.core.ServerResponse preProcess(org.jboss.resteasy.spi.HttpRequest request,
org.jboss.resteasy.core.ResourceMethod resourceMethod)
throws org.jboss.resteasy.spi.Failure,
javax.ws.rs.WebApplicationException
- Pre-processes all the REST requests. Get the UserProfile from the session
and sets the tenant information into the Thread
- Specified by:
preProcess
in interface org.jboss.resteasy.spi.interception.PreProcessInterceptor
- Throws:
org.jboss.resteasy.spi.Failure
javax.ws.rs.WebApplicationException
postProcess
public void postProcess(org.jboss.resteasy.core.ServerResponse response)
- Post-processes all the REST requests. Remove tenant's information from thread
- Specified by:
postProcess
in interface org.jboss.resteasy.spi.interception.PostProcessInterceptor