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