From: Niels Erik G. Nielsen Date: Tue, 14 May 2013 16:31:34 +0000 (-0400) Subject: Removes last piece of business logic from thread object X-Git-Tag: v0.0.7~103 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=024ae722c80df92fd14b2a82f0c63004776aee02;p=mkjsf-moved-to-github.git Removes last piece of business logic from thread object .. making a purely technical class, just for executing pz2 requests asynchronously --- diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/CommandThread.java b/src/main/java/com/indexdata/mkjsf/pazpar2/CommandThread.java index 1225116..10a0adc 100644 --- a/src/main/java/com/indexdata/mkjsf/pazpar2/CommandThread.java +++ b/src/main/java/com/indexdata/mkjsf/pazpar2/CommandThread.java @@ -17,20 +17,9 @@ public class CommandThread extends Thread { } /** - * Runs the specified command using the specified Pazpar2 client - * Sets the Pazpar2 response as an XML response string to be retrieved by - * getResponse(). - * - * In case of an exception, an error response is generated, the document - * element being the same as it would have been if successful (named after - * the command, that is). - * + * Executes the specified command using the specified Pazpar2 client */ - public void run() { - - if (command.getCommandName().equals("search")) { - client.setSearchCommand(command); - } + public void run() { long start = System.currentTimeMillis(); commandResponse = client.executeCommand(command); long end = System.currentTimeMillis();