-
-
Save kyrre/8caadbe2730642157326 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns contorted.core | |
(import (org.wso2.balana Balana PDP PDPConfig ConfigurationStore) | |
(org.wso2.balana.finder.impl FileBasedPolicyFinderModule))) | |
; For the static method everything works as expected. | |
(Balana/getInstance) | |
; Cannot find this method? | |
(.getInstance Balana "" "" "" "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Balana { | |
// All the constructors are private. | |
public static Balana getInstance(){ | |
if(balana == null){ | |
synchronized (lock){ | |
if(balana == null){ | |
balana = new Balana(null, null, null, null); | |
} | |
} | |
} | |
return balana; | |
} | |
public Balana getInstance(String pdpConfigName, String attributeFactoryName, String functionFactoryName, | |
String combiningAlgFactoryName){ | |
if(balana == null){ | |
synchronized (lock){ | |
if(balana == null){ | |
balana = new Balana(pdpConfigName, attributeFactoryName, functionFactoryName, | |
combiningAlgFactoryName); | |
} | |
} | |
} | |
return balana; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment