removed = Boolean.valueOf((String) nextItem.readNextChild()).booleanValue();
}
}
// create a ProvidesPortInfo entry
ProvidesPortInfo pInfo = new ProvidesPortInfo(portName,
portType,
tMap,
providesPortHandle);
pInfo.setInUse(inUse);
pInfo.setNumConnections(numConnections);
if (removed)
pInfo.removePort();
// export this port as a grid service
String portImpl = tMap.getString("cca.portImpl", "None");
if (portImpl.equals("None"))
throw new UnexpectedException("Can't find FQN for provides port: " + portName);
Class portClass = Class.forName(portImpl);
// assumption here that a void constructor exists
Object portInstance = portClass.newInstance();
String intfClassName = tMap.getString("portClass", "None");
UnicastRemoteObject.exportObject((XCATPort) portInstance,
new Class[]{Class.forName(intfClassName)});
// add a reference to the Handle Resolver
String portGSH = pInfo.getProvidesPortHandle();
((XCATPort) portInstance).setGSH(portGSH);
HandleResolver.addReference(portGSH, (XCATPort) portInstance);
// add this provides port to the hashMap
providesPortMap.put(portName, pInfo);