Skip to content

Instantly share code, notes, and snippets.

@kyrre
Created September 18, 2014 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyrre/8caadbe2730642157326 to your computer and use it in GitHub Desktop.
Save kyrre/8caadbe2730642157326 to your computer and use it in GitHub Desktop.
(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 "" "" "" "")
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