Java Reference
In-Depth Information
L ISTING 7.10 Continued
return null;
}
/** Implements the related Deploylet method */
public Deploylet getClient() {
return this;
}
/** Implements the related Deploylet method */
public void setClient(Deploylet d) {
//do nothing
7
}
/** Implements the related Deploylet method */
public void setServer(Deploylet d) {
server = d;
}
/** a convenience method for DebugService access */
protected void log(String m){
// DebugService.log(“[“ + new java.util.Date()+ “] “ + m );
DebugService.log(“ - “ + m );//shorter
}
/** a convenience method for DebugService access */
protected void log(Exception e){
try {
// in case of an exception report it to the server
CharArrayWriter caw = new CharArrayWriter();
PrintWriter pw = new PrintWriter(caw);
e.printStackTrace(pw);
String s = new String(caw.toCharArray());
DebugService.log(“Uncaught Exception trace:\n”);
DebugService.log(s);
server.requestService(new DebugService(“Uncaught Exception:
“+e.getMessage()));
} catch (Exception exc) {
System.out.println(“ClientDeploylet.log: “+exc);
}
}
}
Search WWH ::




Custom Search