Class DefaultEffector

  • All Implemented Interfaces:
    Effector

    public class DefaultEffector
    extends java.lang.Object
    implements Effector
    DefaultEffector is default effector for Casbin.
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultEffector()
      DefaultEffector is the constructor for DefaultEffector.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean mergeEffects​(java.lang.String expr, Effect[] effects, float[] results)
      mergeEffects merges all matching results collected by the enforcer into a single decision.
      StreamEffector newStreamEffector​(java.lang.String expr)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultEffector

        public DefaultEffector()
        DefaultEffector is the constructor for DefaultEffector.
    • Method Detail

      • mergeEffects

        public boolean mergeEffects​(java.lang.String expr,
                                    Effect[] effects,
                                    float[] results)
        mergeEffects merges all matching results collected by the enforcer into a single decision.
        Specified by:
        mergeEffects in interface Effector
        Parameters:
        expr - the expression of [policy_effect].
        effects - the effects of all matched rules.
        results - the matcher results of all matched rules.
        Returns:
        the final effect.