public static void stop(Object object) throws ExecutionException {
try {
// stop the object if it implements Serviceable
if (Serviceable.class.isInstance(object)) {
Serviceable connectorService = (Serviceable) object;
connectorService.doStop();
}
} catch (Exception e) {
throw new ExecutionException("Exception while stopping object: " + e.getMessage(), e);
}
}