service.setServiceContract(contract);
return service;
}
public void processCallback(Class<?> interfaze, ServiceContract<?> contract) throws IllegalCallbackException {
Callback callback = interfaze.getAnnotation(Callback.class);
if (callback != null && !Void.class.equals(callback.value())) {
Class<?> callbackClass = callback.value();
contract.setCallbackClass(callbackClass);
contract.setCallbackName(getBaseName(callbackClass));
} else if (callback != null && Void.class.equals(callback.value())) {
IllegalCallbackException e = new IllegalCallbackException(
"Callback annotation must specify an interface on service type");
e.setIdentifier(interfaze.getName());
throw e;
}