我正在研究一些服务器代码,客户端以JSON的形式发送请求.我的问题是,有许多可能的请求,所有请求都在小的实现细节中有所不同.因此我想使用Request接口,定义如下:
public interface Request {
Response process ( );
}
Run Code Online (Sandbox Code Playgroud)
从那里,我在一个名为LoginRequest如下所示的类中实现了接口:
public class LoginRequest implements Request {
private String type = "LOGIN";
private String username;
private String password;
public LoginRequest(String username, String password) {
this.username = username;
this.password = password;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return …Run Code Online (Sandbox Code Playgroud) 我正在与SBCL(SBCL 1.2.13.84-7d75f89)一起学习本书中的 Common Lisp .我遇到了一个问题,试图找到并加载名为的包multiprocessing.
我曾尝试做(ql:system-apropos "multiprocessing"),(ql:system-apropos "thread"),(ql:system-apropos "smp")想看看是否有一个使用它的quicklisp包.
我也使用谷歌搜索,甚至在Quickdocs,但我似乎在某处失败.
如有任何帮助,我将不胜感激.