HttpProcessor.java
private HttpConnector connector = null;
private void log(String message) {
Logger logger = connector .getContainer().getLogger();
if (logger != null)
logger.log(threadName + " " + message); // 为什么这句话可以用?往下推论
}
HttpProcessor.java
public HttpProcessor( HttpConnector connector , int id) {
super();
this.connector = connector ;
this.debug = connector.getDebug();
this.id = id;
this.proxyName = connector.getProxyName();
this.proxyPort = connector.getProxyPort();
this.request = (HttpRequestImpl) connector.createRequest();
this.response = (HttpResponseImpl) connector.createResponse();
this.serverPort = connector.getPort();
this.threadName =
"HttpProcessor[" + connector.getPort() + "][" + id + "]";
}
HttpConnector.java
private HttpProcessor newProcessor() {
HttpProcessor processor = new HttpProcessor( this , curProcessors++);
if (processor instanceof Lifecycle) {
try {
((Lifecycle) processor).start();
} catch (LifecycleException e) {
log("newProcessor", e);
return (null);
}
}
created.addElement(processor);
return (processor);
}