线程通信
源代码在线查看: response.java
import java.util.*;
import java.io.*;
public class Response implements Serializable{
private String message;
private boolean authenPass=false;
private List effectedBooks=new ArrayList();
// bookId of effectedBook
public Response(String message){
this.message=message;
}
public void addBook(String bookId){
effectedBooks.add(bookId);
}
public void addMess(String message){
this.message+=message;
}
public void setPass(boolean authenPass){
this.authenPass=authenPass;
}
public boolean getPass(){
return authenPass;
}
public String toString(){
return "successful books:"+effectedBooks.toString()+"\n"+message;
}
}