summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/entity
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-06-05 14:13:37 +0200
committerAndrew Branson <andrew.branson@cern.ch>2014-06-05 14:13:37 +0200
commitcedb32b6b7a799ef4142b418e64d3538cf604af1 (patch)
tree20b6975f944132485beff9304869df0ac589da36 /src/main/java/com/c2kernel/entity
parent28f6763508612fadcc34d87cff383e6a5aef2ad6 (diff)
Recreate old Authenticator interface as 'ProxyLogin'
Server boots with new lookup interface.
Diffstat (limited to 'src/main/java/com/c2kernel/entity')
-rw-r--r--src/main/java/com/c2kernel/entity/proxy/ProxyManager.java22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/main/java/com/c2kernel/entity/proxy/ProxyManager.java b/src/main/java/com/c2kernel/entity/proxy/ProxyManager.java
index 9503e54..2b2e0e9 100644
--- a/src/main/java/com/c2kernel/entity/proxy/ProxyManager.java
+++ b/src/main/java/com/c2kernel/entity/proxy/ProxyManager.java
@@ -156,7 +156,7 @@ public class ProxyManager
**************************************************************************/
private ItemProxy createProxy( org.omg.CORBA.Object ior,
int systemKey,
- boolean isItem )
+ boolean isAgent )
throws ObjectNotFoundException
{
@@ -164,13 +164,13 @@ public class ProxyManager
Logger.msg(5, "ProxyManager::creating proxy on Item " + systemKey);
- if( isItem )
+ if( isAgent )
{
- newProxy = new ItemProxy(ior, systemKey);
+ newProxy = new AgentProxy(ior, systemKey);
}
else
{
- newProxy = new AgentProxy(ior, systemKey);
+ newProxy = new ItemProxy(ior, systemKey);
}
// subscribe to changes from server
@@ -194,7 +194,7 @@ public class ProxyManager
**************************************************************************/
private ItemProxy getProxy( org.omg.CORBA.Object ior,
int systemKey,
- boolean isItem )
+ boolean isAgent )
throws ObjectNotFoundException
{
Integer key = new Integer(systemKey);
@@ -205,7 +205,7 @@ public class ProxyManager
newProxy = proxyPool.get(key);
if (newProxy == null) {
// create a new one
- newProxy = createProxy(ior, systemKey, isItem );
+ newProxy = createProxy(ior, systemKey, isAgent );
proxyPool.put(key, newProxy);
}
return newProxy;
@@ -224,12 +224,18 @@ public class ProxyManager
//convert namePath to dn format
Logger.msg(8,"ProxyManager::getProxy(" + path.toString() + ")");
- boolean isItem = !(path.getEntity() instanceof AgentPath);
+ boolean isAgent = (path.getEntity() instanceof AgentPath);
return getProxy( Gateway.getLookup().resolve(path),
path.getSysKey(),
- isItem );
+ isAgent );
}
+
+ public AgentProxy getAgentProxy( AgentPath path )
+ throws ObjectNotFoundException
+ {
+ return (AgentProxy) getProxy(path);
+ }
/**************************************************************************
* void reportCurrentProxies()