return introspect(type, callbackClass);
}
public <I, C> JavaServiceContract introspect(Class<I> type, Class<C> callback)
throws InvalidServiceContractException {
JavaServiceContract contract = new JavaServiceContract();
contract.setInterfaceName(getBaseName(type));
contract.setInterfaceClass(type);
boolean remotable = type.isAnnotationPresent(Remotable.class);
contract.setRemotable(remotable);
contract.setOperations(getOperations(type, remotable));
if (callback != null) {
contract.setCallbackName(getBaseName(callback));
contract.setCallbackClass(callback);
contract.setCallbackOperations(getOperations(callback, remotable));
}
Scope interactionScope = type.getAnnotation(Scope.class);
if (interactionScope == null) {
contract.setInteractionScope(InteractionScope.NONCONVERSATIONAL);
} else {
if ("CONVERSATIONAL".equalsIgnoreCase(interactionScope.value())) {
contract.setInteractionScope(InteractionScope.CONVERSATIONAL);
} else {
contract.setInteractionScope(InteractionScope.NONCONVERSATIONAL);
}
}
for (JavaInterfaceProcessor processor : processors) {
processor.visitInterface(type, callback, contract);
}