- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 18 Sep 2009 17:11:01 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn In directory hutz:/tmp/cvs-serv17864/src/org/w3c/unicorn Modified Files: RequestThread.java Log Message: removed unicornCall object and mapOfResponse objects passed as parameters Index: RequestThread.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/RequestThread.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- RequestThread.java 16 Sep 2009 13:48:38 -0000 1.4 +++ RequestThread.java 18 Sep 2009 17:10:59 -0000 1.5 @@ -33,7 +33,9 @@ /** * Data Structure for the responses */ - private Map<String, Response> mapOfResponse; + //private Map<String, Response> mapOfResponse; + + private Response aResponse; /** * The request to make @@ -45,10 +47,12 @@ */ private String obsID; + private String lang; + /** * The call to perform */ - private UnicornCall unicornCall; + //private UnicornCall unicornCall; /** * Initialize the thread by filling the properties @@ -62,13 +66,16 @@ * @param unicorn * the unicorn call to make */ - public RequestThread(Map<String, Response> mapOfResponse, Request aRequest, - String obsID, UnicornCall unicorn) { - this.mapOfResponse = mapOfResponse; + public RequestThread(//Map<String, Response> mapOfResponse, + Request aRequest, + String obsID, + //UnicornCall unicorn, + String lang) { + //this.mapOfResponse = mapOfResponse; this.aRequest = aRequest; this.obsID = obsID; - this.unicornCall = unicorn; - + this.lang = lang; + //this.unicornCall = unicorn; } /** @@ -76,7 +83,7 @@ */ @Override public void run() { - Response aResponse = null; + //Response aResponse = null; try { // Uncomment/comment next lines to test io_error //throw new Exception("Message test de l'exception"); @@ -87,7 +94,7 @@ StringBuilder builder = new StringBuilder(); //String lang[] = unicornCall.getMapOfStringParameter().get( // Property.get("UNICORN_PARAMETER_PREFIX") + "lang"); - String lang = unicornCall.getLang(); + //String lang = unicornCall.getLang(); VelocityContext context = new VelocityContext(Framework.getLanguageContexts().get(lang)); EventCartridge aEventCartridge = new EventCartridge(); @@ -125,10 +132,13 @@ e1.printStackTrace(); } } + + this.aResponse.setObserverId(obsID); + RequestThread.logger.debug(obsID + " before sync mapOfResponse"); - synchronized (mapOfResponse) { + /*synchronized (mapOfResponse) { mapOfResponse.put(obsID, aResponse); - } + }*/ RequestThread.logger.debug(obsID + " after sync mapOfResponse"); } @@ -136,5 +146,15 @@ return obsID; } + public Response getResponse() { + return aResponse; + } + + public void setResponse(Response aResponse) { + this.aResponse = aResponse; + } + + + }
Received on Friday, 18 September 2009 17:11:11 UTC