@InterceptsRemoteCall(value=AuthenticationService.class) @Dependent public class AuthenticationServiceInterceptor extends Object implements RemoteCallInterceptor<RemoteCallContext>
AuthenticationService
for populating
and removing the current logged in user via SecurityContext
.Constructor and Description |
---|
AuthenticationServiceInterceptor(SecurityContext securityContext) |
Modifier and Type | Method and Description |
---|---|
void |
aroundInvoke(RemoteCallContext callContext)
Interposes on the execution of remote method calls that should be intercepted.
|
@Inject public AuthenticationServiceInterceptor(SecurityContext securityContext)
public void aroundInvoke(RemoteCallContext callContext)
RemoteCallInterceptor
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)
.
aroundInvoke
in interface RemoteCallInterceptor<RemoteCallContext>
callContext
- the call context of the intercepted method, not null.Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.