Throw an exception when the dispatcher can't find the implementation for an API command.

This commit is contained in:
Kris McQueen 2010-09-21 18:26:57 -07:00
parent e31f89e6a9
commit c26426c7c7

View File

@ -151,6 +151,10 @@ public class ApiDispatcher {
setupParameters(cmd, params);
Implementation impl = cmd.getClass().getAnnotation(Implementation.class);
if (impl == null) {
throw new CloudRuntimeException("Unable to execute command " + cmd.getClass().getName() + ", no implementation specified.");
}
String methodName = impl.method();
Object mgr = _mgmtServer;
switch (impl.manager()) {