private void introspectCallback(Class<?> interfaze, Class<?> callbackClass, JavaServiceContract contract, IntrospectionContext context, ModelObject... modelObjects) { if (Void.class.equals(callbackClass)) { context.addError(new MissingCallback(interfaze, modelObjects)); return; } // the base class for the callback interface is always itself since it is not referenceable in Java from the service implementation // or client implementation where the reference is injected JavaServiceContract callbackContract = introspectInterface(callbackClass, callbackClass, context); if (contract.isRemotable() != callbackContract.isRemotable()) { String forwardName = contract.getInterfaceName(); String callbackName = callbackContract.getInterfaceName(); InvalidCallbackContract error = new InvalidCallbackContract("The remotable attribute on the forward and callback contract do not match: " + forwardName + "," + callbackName, callbackClass, modelObjects); context.addError(error); } contract.setCallbackContract(callbackContract); }
private void introspectCallback(Class<?> interfaze, Class<?> callbackClass, JavaServiceContract contract, IntrospectionContext context, ModelObject... modelObjects) { if (Void.class.equals(callbackClass)) { context.addError(new MissingCallback(interfaze, modelObjects)); return; } // the base class for the callback interface is always itself since it is not referenceable in Java from the service implementation // or client implementation where the reference is injected JavaServiceContract callbackContract = introspectInterface(callbackClass, callbackClass, context); if (contract.isRemotable() != callbackContract.isRemotable()) { String forwardName = contract.getInterfaceName(); String callbackName = callbackContract.getInterfaceName(); InvalidCallbackContract error = new InvalidCallbackContract( "The remotable attribute on the forward and callback contract do not match: " + forwardName + "," + callbackName, callbackClass, modelObjects); context.addError(error); } contract.setCallbackContract(callbackContract); }