logger.finest("wake up sleeper waiting for port to be released");
pInfo.notify();
return;
}
else
throw new PortNotInUseException("Port " + portName + " not in use");
}
}
// For uses ports
UsesPortInfo uInfo =
(UsesPortInfo) usesPortMap.get(portName);
if (uInfo != null) {
synchronized(uInfo) {
if (uInfo.isUnregistered())
throw new PortNotDefinedException("Uses port: " + portName +
" has been unregistered");
if (uInfo.getInUse()) {
uInfo.setInUse(false);
logger.finest("wake up sleeper waiting for port to be released");
uInfo.notify();
return;
}
else
throw new PortNotInUseException("Port " + portName + " not in use");
}
}
logger.severe("Port " + portName + " not defined");
throw new PortNotDefinedException("Port " + portName + " not defined");