public class org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager extends java.lang.Object implements org.apache.cxf.fediz.cxf.plugin.state.SPStateManager
{
public static final java.lang.String REQUEST_CACHE_KEY;
public static final java.lang.String RESPONSE_CACHE_KEY;
private org.ehcache.Cache requestCache;
private org.ehcache.Cache responseCache;
private org.ehcache.CacheManager cacheManager;
public void <init>(java.lang.String)
{
java.lang.String v;
org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager v;
java.net.URL v;
v := @this: org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager;
v := @parameter: java.lang.String;
v = staticinvoke <org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: java.net.URL getConfigFileURL(java.lang.String)>(v);
specialinvoke v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: void <init>(java.net.URL)>(v);
return;
}
public void <init>(java.net.URL)
{
org.ehcache.CacheManager v, v;
org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager v;
java.net.URL v;
org.ehcache.xml.XmlConfiguration v;
v := @this: org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager;
v := @parameter: java.net.URL;
specialinvoke v.<java.lang.Object: void <init>()>();
v = new org.ehcache.xml.XmlConfiguration;
specialinvoke v.<org.ehcache.xml.XmlConfiguration: void <init>(java.net.URL)>(v);
v = staticinvoke <org.ehcache.config.builders.CacheManagerBuilder: org.ehcache.CacheManager newCacheManager(org.ehcache.config.Configuration)>(v);
v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: org.ehcache.CacheManager cacheManager> = v;
v = v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: org.ehcache.CacheManager cacheManager>;
interfaceinvoke v.<org.ehcache.CacheManager: void init()>();
specialinvoke v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: void initCache()>();
return;
}
public void <init>(org.ehcache.CacheManager)
{
org.ehcache.CacheManager v;
org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager v;
v := @this: org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager;
v := @parameter: org.ehcache.CacheManager;
specialinvoke v.<java.lang.Object: void <init>()>();
v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: org.ehcache.CacheManager cacheManager> = v;
specialinvoke v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: void initCache()>();
return;
}
private static java.net.URL getConfigFileURL(java.lang.String)
{
java.net.URL v, v;
java.io.IOException v;
java.lang.String v;
v := @parameter: java.lang.String;
label:
v = staticinvoke <org.apache.wss4j.common.util.Loader: java.net.URL getResource(java.lang.String)>(v);
if v != null goto label;
v = new java.net.URL;
specialinvoke v.<java.net.URL: void <init>(java.lang.String)>(v);
v = v;
label:
return v;
label:
v := @caughtexception;
return null;
catch java.io.IOException from label to label with label;
}
private void initCache()
{
org.ehcache.CacheManager v, v;
org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager v;
org.ehcache.Cache v, v;
v := @this: org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager;
v = v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: org.ehcache.CacheManager cacheManager>;
v = interfaceinvoke v.<org.ehcache.CacheManager: org.ehcache.Cache getCache(java.lang.String,java.lang.Class,java.lang.Class)>("cxf.fediz.samlp.request.state.cache", class "Ljava/lang/String;", class "Lorg/apache/cxf/fediz/core/RequestState;");
v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: org.ehcache.Cache requestCache> = v;
v = v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: org.ehcache.CacheManager cacheManager>;
v = interfaceinvoke v.<org.ehcache.CacheManager: org.ehcache.Cache getCache(java.lang.String,java.lang.Class,java.lang.Class)>("cxf.fediz.samlp.response.state.cache", class "Ljava/lang/String;", class "Lorg/apache/cxf/fediz/cxf/plugin/state/ResponseState;");
v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: org.ehcache.Cache responseCache> = v;
return;
}
public void setRequestState(java.lang.String, org.apache.cxf.fediz.core.RequestState)
{
org.apache.cxf.fediz.core.RequestState v;
org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager v;
java.lang.String v;
org.ehcache.Cache v;
boolean v;
v := @this: org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager;
v := @parameter: java.lang.String;
v := @parameter: org.apache.cxf.fediz.core.RequestState;
if v == null goto label;
v = virtualinvoke v.<java.lang.String: boolean isEmpty()>();
if v != 0 goto label;
v = v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: org.ehcache.Cache requestCache>;
interfaceinvoke v.<org.ehcache.Cache: void put(java.lang.Object,java.lang.Object)>(v, v);
label:
return;
}
public org.apache.cxf.fediz.core.RequestState removeRequestState(java.lang.String)
{
org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager v;
java.lang.Object v;
java.lang.String v;
org.ehcache.Cache v, v;
v := @this: org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager;
v := @parameter: java.lang.String;
v = v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: org.ehcache.Cache requestCache>;
v = interfaceinvoke v.<org.ehcache.Cache: java.lang.Object get(java.lang.Object)>(v);
if v == null goto label;
v = v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: org.ehcache.Cache requestCache>;
interfaceinvoke v.<org.ehcache.Cache: void remove(java.lang.Object)>(v);
label:
return v;
}
public org.apache.cxf.fediz.cxf.plugin.state.ResponseState getResponseState(java.lang.String)
{
org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager v;
java.lang.Object v;
java.lang.String v;
org.ehcache.Cache v;
v := @this: org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager;
v := @parameter: java.lang.String;
v = v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: org.ehcache.Cache responseCache>;
v = interfaceinvoke v.<org.ehcache.Cache: java.lang.Object get(java.lang.Object)>(v);
return v;
}
public void setResponseState(java.lang.String, org.apache.cxf.fediz.cxf.plugin.state.ResponseState)
{
org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager v;
org.apache.cxf.fediz.cxf.plugin.state.ResponseState v;
java.lang.String v;
org.ehcache.Cache v;
boolean v;
v := @this: org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager;
v := @parameter: java.lang.String;
v := @parameter: org.apache.cxf.fediz.cxf.plugin.state.ResponseState;
if v == null goto label;
v = virtualinvoke v.<java.lang.String: boolean isEmpty()>();
if v != 0 goto label;
v = v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: org.ehcache.Cache responseCache>;
interfaceinvoke v.<org.ehcache.Cache: void put(java.lang.Object,java.lang.Object)>(v, v);
label:
return;
}
public org.apache.cxf.fediz.cxf.plugin.state.ResponseState removeResponseState(java.lang.String)
{
org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager v;
java.lang.Object v;
java.lang.String v;
org.ehcache.Cache v, v;
v := @this: org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager;
v := @parameter: java.lang.String;
v = v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: org.ehcache.Cache responseCache>;
v = interfaceinvoke v.<org.ehcache.Cache: java.lang.Object get(java.lang.Object)>(v);
if v == null goto label;
v = v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: org.ehcache.Cache responseCache>;
interfaceinvoke v.<org.ehcache.Cache: void remove(java.lang.Object)>(v);
label:
return v;
}
public void close() throws java.io.IOException
{
org.ehcache.CacheManager v, v;
org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager v;
v := @this: org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager;
v = v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: org.ehcache.CacheManager cacheManager>;
if v == null goto label;
v = v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: org.ehcache.CacheManager cacheManager>;
interfaceinvoke v.<org.ehcache.CacheManager: void close()>();
v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: org.ehcache.CacheManager cacheManager> = null;
v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: org.ehcache.Cache requestCache> = null;
v.<org.apache.cxf.fediz.cxf.plugin.state.EHCacheSPStateManager: org.ehcache.Cache responseCache> = null;
label:
return;
}
}