Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- final String WORKERS_PATH = "/ext/";
- if (path.startsWith(WORKERS_PATH)) {
- Class<?> referenceToClass = this
- .getClass()
- .getClassLoader()
- .loadClass(
- "hr.fer.zemris.java.webserver.workers"
- + "."
- + path.substring(WORKERS_PATH
- .length()));
- Object newWorker = referenceToClass.newInstance();
- IWebWorker worker = (IWebWorker) newWorker;
- worker.processRequest(new RequestContext(ostream, params,
- permParams, outputCookies));
- csocket.close();
- return;
- }
- if (workersMap.containsKey(path)) {
- workersMap.get(path).processRequest(
- new RequestContext(ostream, params, permParams,
- outputCookies));
- csocket.close();
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement