54b164801f73ed4d0315e2fc7da5c9d761b14d07
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / pz2utils4jsf / pazpar2 / SearchClient.java
1 package com.indexdata.pz2utils4jsf.pazpar2;\r
2 \r
3 import java.io.ByteArrayOutputStream;\r
4 import java.io.IOException;\r
5 import java.io.Serializable;\r
6 \r
7 import com.indexdata.masterkey.pazpar2.client.exceptions.Pazpar2ErrorException;\r
8 import com.indexdata.pz2utils4jsf.config.Configurable;\r
9 import com.indexdata.pz2utils4jsf.config.Configuration;\r
10 import com.indexdata.pz2utils4jsf.pazpar2.commands.Pazpar2Command;\r
11 \r
12 public interface SearchClient extends Configurable, Serializable {\r
13   \r
14   public void setSearchCommand(Pazpar2Command command);\r
15   public CommandResponse executeCommand(Pazpar2Command command, ByteArrayOutputStream baos) throws Pazpar2ErrorException, IOException;\r
16   \r
17   // Use cloneMe() method if injecting the client with CDI.\r
18   // The client is used for asynchronously sending off requests\r
19   // to the server AND propagation of context to threads is currently \r
20   // not supported. Trying to do so throws a WELD-001303 error. \r
21   // If propagation to threads gets supported, the cloning can go.\r
22   public SearchClient cloneMe();\r
23   \r
24   public boolean isAuthenticatingClient();  \r
25   public Configuration getConfiguration();\r
26 }\r