Crispy 是 Communication per Remote Invocation for different kinds of Services via ProxYs 的缩写。Crispy 是一个远程调用框架,它支持广泛的传输协议,如 RMI、EJB、JAX-RPC 和 XML- RPC。简而言之,Crispy 就像配置服务管理器(通过属性文件)来调用受支持的远程 API 一样容易。
配置实例:
Properties prop = new Properties(); prop.put(Property.REMOTE_URL_AND_PORT, serviceUrl); prop.put(Property.EXECUTOR_CLASS, typeOfExecutor); ServiceManager manager = new ServiceManager(prop); LibraryService library = (LibraryService) manager.createService(LibraryService.class); String author = library.findAuthor(myBook); String isbn = library.findISBN(myBook);