1 package com.indexdata.mkjsf.pazpar2;
\r
3 import java.io.ByteArrayOutputStream;
\r
4 import java.io.IOException;
\r
5 import java.io.Serializable;
\r
7 import com.indexdata.masterkey.pazpar2.client.exceptions.Pazpar2ErrorException;
\r
8 import com.indexdata.mkjsf.config.Configurable;
\r
9 import com.indexdata.mkjsf.config.Configuration;
\r
10 import com.indexdata.mkjsf.pazpar2.commands.Pazpar2Command;
\r
12 public interface SearchClient extends Configurable, Serializable {
\r
14 public void setSearchCommand(Pazpar2Command command);
\r
15 public CommandResponse executeCommand(Pazpar2Command command, ByteArrayOutputStream baos) throws Pazpar2ErrorException, IOException;
\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
24 public boolean isAuthenticatingClient();
\r
25 public Configuration getConfiguration();
\r