Renames project from pz2utils4jsf to mkjsf
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / pz2utils4jsf / pazpar2 / SearchClient.java
index 7534150..54b1648 100644 (file)
@@ -4,17 +4,23 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;\r
 import java.io.Serializable;\r
 \r
-import com.indexdata.masterkey.pazpar2.client.Pazpar2HttpResponse;\r
 import com.indexdata.masterkey.pazpar2.client.exceptions.Pazpar2ErrorException;\r
-import com.indexdata.pz2utils4jsf.config.Pz2Configurator;\r
-import com.indexdata.pz2utils4jsf.errors.ConfigurationException;\r
+import com.indexdata.pz2utils4jsf.config.Configurable;\r
+import com.indexdata.pz2utils4jsf.config.Configuration;\r
+import com.indexdata.pz2utils4jsf.pazpar2.commands.Pazpar2Command;\r
 \r
-\r
-public interface SearchClient extends Serializable {\r
-\r
-  public void configure(Pz2Configurator configurator) throws ConfigurationException;\r
+public interface SearchClient extends Configurable, Serializable {\r
+  \r
   public void setSearchCommand(Pazpar2Command command);\r
   public CommandResponse executeCommand(Pazpar2Command command, ByteArrayOutputStream baos) throws Pazpar2ErrorException, IOException;\r
+  \r
+  // Use cloneMe() method if injecting the client with CDI.\r
+  // The client is used for asynchronously sending off requests\r
+  // to the server AND propagation of context to threads is currently \r
+  // not supported. Trying to do so throws a WELD-001303 error. \r
+  // If propagation to threads gets supported, the cloning can go.\r
   public SearchClient cloneMe();\r
   \r
+  public boolean isAuthenticatingClient();  \r
+  public Configuration getConfiguration();\r
 }\r