service.getInterfaceContract().setInterface(javaInterface);
return service;
}
private void processCallback(Class<?> interfaze, Contract contract) throws InvalidServiceTypeException {
Callback callback = interfaze.getAnnotation(Callback.class);
if (callback != null && !Void.class.equals(callback.value())) {
Class<?> callbackClass = callback.value();
JavaInterface javaInterface;
try {
javaInterface = javaInterfaceFactory.createJavaInterface(callbackClass);
contract.getInterfaceContract().setCallbackInterface(javaInterface);
} catch (InvalidInterfaceException e) {
throw new InvalidServiceTypeException("Invalid callback interface "+callbackClass, interfaze);
}
} else if (callback != null && Void.class.equals(callback.value())) {
throw new InvalidServiceTypeException("No callback interface specified on annotation", interfaze);
}
}