Errai 3.0.1-SNAPSHOT

org.jboss.errai.security.client.local.interceptors
Class ClientSecurityRoleInterceptor

java.lang.Object
  extended by org.jboss.errai.security.client.local.interceptors.ClientSecurityRoleInterceptor
All Implemented Interfaces:
RemoteCallInterceptor<RemoteCallContext>

@FeatureInterceptor(value=RestrictedAccess.class)
@Dependent
public class ClientSecurityRoleInterceptor
extends Object
implements RemoteCallInterceptor<RemoteCallContext>

Intercepts RPC calls to resources marked with RestrictedAccess. This interceptor throws an UnauthenticatedException if the user is not logged in, and a UnauthorizedException if the user does not have the required roles.

Author:
edewit@redhat.com, Max Barkley

Constructor Summary
ClientSecurityRoleInterceptor(SecurityContext securityContext)
           
 
Method Summary
 void aroundInvoke(RemoteCallContext callContext)
          Interposes on the execution of remote method calls that should be intercepted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientSecurityRoleInterceptor

@Inject
public ClientSecurityRoleInterceptor(SecurityContext securityContext)
Method Detail

aroundInvoke

public void aroundInvoke(RemoteCallContext callContext)
Description copied from interface: RemoteCallInterceptor
Interposes on the execution of remote method calls that should be intercepted.

Note that in contrast to local/synchronous method call interceptors, this method does not return a result as the actual remote call is executed asynchronously and the result is not available when this method returns.

To execute the actual remote call, invoke CallContext.proceed().

To get access to the remote call's result, call RemoteCallContext.proceed(RemoteCallback) or RemoteCallContext.proceed(RemoteCallback, ErrorCallback).

To change the result, call RemoteCallContext.setResult(Object).

Specified by:
aroundInvoke in interface RemoteCallInterceptor<RemoteCallContext>
Parameters:
callContext - the call context of the intercepted method, not null.

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.