VMware GemFire Java API Reference
Class ExampleAnnotationBasedMethodInvocationAuthorizer
- All Implemented Interfaces:
MethodInvocationAuthorizer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanExecutes the authorization logic to determine whether themethodis allowed to be executed on thetargetobject instance.voidinitialize(Cache cache, Set<String> parameters)
-
Constructor Details
-
ExampleAnnotationBasedMethodInvocationAuthorizer
public ExampleAnnotationBasedMethodInvocationAuthorizer()
-
-
Method Details
-
initialize
Description copied from interface:MethodInvocationAuthorizerInitializes the MethodInvocationAuthorizer using aCacheand aSetofStringparameters.This method exists to allow user-specified method authorizers to be configured and used at runtime. If this method is not overridden in a user-specified authorizer then that authorizer will not be configurable.
- Specified by:
initializein interfaceMethodInvocationAuthorizer- Parameters:
cache- theCacheto which the MethodInvocationAuthorizer will belongparameters- aSetofStringthat will be used to configure the
-
authorize
Description copied from interface:MethodInvocationAuthorizerExecutes the authorization logic to determine whether themethodis allowed to be executed on thetargetobject instance.Implementation Note: this method is called for every method invocation reached while traversing query results, for every target object seen, since the verdict may depend on the specific target instance (for example, per-
Regionaccess checks) and not solely on theMethodbeing invoked. The implementation should therefore be lightning fast, as it will be called by the OQL engine at runtime during query execution.- Specified by:
authorizein interfaceMethodInvocationAuthorizer- Parameters:
method- theMethodthat should be authorized.target- theObjecton which theMethodwill be executed.- Returns:
trueif the method is annotated withExampleAnnotationBasedMethodInvocationAuthorizer.Authorizedand not permanently forbidden,falseotherwise
-