diff options
| author | abranson <andrew.branson@cern.ch> | 2011-08-04 16:08:49 +0200 |
|---|---|---|
| committer | abranson <andrew.branson@cern.ch> | 2011-08-04 16:08:49 +0200 |
| commit | 379ed8a0e133bee650e0acb24f6b743f657a50d0 (patch) | |
| tree | bdcac37cabe3f2f3d40715519b830469dc9e63ad /source/com/c2kernel/entity/proxy | |
| parent | 0ec8481c10cd8277d84c7c1a785483a0a739e5a0 (diff) | |
Last bit of cleanup honest
New castor and dependent commons libs
Diffstat (limited to 'source/com/c2kernel/entity/proxy')
4 files changed, 4 insertions, 49 deletions
diff --git a/source/com/c2kernel/entity/proxy/AgentProxy.java b/source/com/c2kernel/entity/proxy/AgentProxy.java index f2e8283..72ed088 100644 --- a/source/com/c2kernel/entity/proxy/AgentProxy.java +++ b/source/com/c2kernel/entity/proxy/AgentProxy.java @@ -272,14 +272,14 @@ public class AgentProxy extends EntityProxy /** Let scripts resolve items */
public ItemProxy searchItem(String name) throws ObjectNotFoundException {
- Enumeration<?> results = Gateway.getLDAPLookup().search(new DomainPath(""),name);
+ Enumeration<Path> results = Gateway.getLDAPLookup().search(new DomainPath(""),name);
Path returnPath = null;
if (!results.hasMoreElements())
throw new ObjectNotFoundException(name, "");
while(results.hasMoreElements()) {
- Path nextMatch = (Path)results.nextElement();
+ Path nextMatch = results.nextElement();
if (returnPath != null && nextMatch.getSysKey() != -1 && returnPath.getSysKey() != nextMatch.getSysKey())
throw new ObjectNotFoundException("Too many items with that name");
returnPath = nextMatch;
diff --git a/source/com/c2kernel/entity/proxy/EntityProxyManager.java b/source/com/c2kernel/entity/proxy/EntityProxyManager.java index 8ad4576..192a984 100644 --- a/source/com/c2kernel/entity/proxy/EntityProxyManager.java +++ b/source/com/c2kernel/entity/proxy/EntityProxyManager.java @@ -47,9 +47,9 @@ public class EntityProxyManager {
Logger.msg(5, "EntityProxyManager - Starting.....");
- Enumeration<?> servers = Gateway.getLDAPLookup().searchEntities(new DomainPath("/servers"));
+ Enumeration<Path> servers = Gateway.getLDAPLookup().searchEntities(new DomainPath("/servers"));
while(servers.hasMoreElements()) {
- Path thisServerPath = (Path)servers.nextElement();
+ Path thisServerPath = servers.nextElement();
try {
int syskey = thisServerPath.getSysKey();
String remoteServer = ((Property)Gateway.getStorage().get(syskey, ClusterStorage.PROPERTY+"/Name", null)).getValue();
diff --git a/source/com/c2kernel/entity/proxy/ProxyMessage.java b/source/com/c2kernel/entity/proxy/ProxyMessage.java index b312a44..62866eb 100644 --- a/source/com/c2kernel/entity/proxy/ProxyMessage.java +++ b/source/com/c2kernel/entity/proxy/ProxyMessage.java @@ -2,7 +2,6 @@ package com.c2kernel.entity.proxy; import java.io.IOException;
import java.net.DatagramPacket;
-import java.net.InetAddress;
import java.util.StringTokenizer;
import com.c2kernel.common.InvalidDataException;
@@ -92,14 +91,6 @@ public class ProxyMessage { public String toString() {
return sysKey+":"+(state?"-":"")+path;
}
- public DatagramPacket getPacket(ProxySubscriber host) {
- return getPacket(host.getHost(), host.getPort());
- }
-
- public DatagramPacket getPacket(InetAddress host, int port) {
- byte[] packetString = toString().getBytes();
- return new DatagramPacket(packetString, packetString.length, host, port);
- }
public String getServer() {
return server;
diff --git a/source/com/c2kernel/entity/proxy/ProxySubscriber.java b/source/com/c2kernel/entity/proxy/ProxySubscriber.java deleted file mode 100644 index 8cb85fa..0000000 --- a/source/com/c2kernel/entity/proxy/ProxySubscriber.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.c2kernel.entity.proxy;
-
-import java.net.DatagramPacket;
-import java.net.InetAddress;
-import java.util.ArrayList;
-
-import com.c2kernel.common.InvalidDataException;
-
-/**************************************************************************
- *
- * $Revision: 1.1 $
- * $Date: 2003/04/24 10:12:40 $
- *
- * Copyright (C) 2003 CERN - European Organization for Nuclear Research
- * All rights reserved.
- **************************************************************************/
-
-public class ProxySubscriber {
-
- private InetAddress host;
- private int port;
- public ArrayList<?> sysKeys = new ArrayList<Object>();
-
- public ProxySubscriber(DatagramPacket packet) throws InvalidDataException {
- host = packet.getAddress();
- port = packet.getPort();
- }
-
- public InetAddress getHost() {
- return host;
- }
-
- public int getPort() {
- return port;
- }
-}
|
