public class ServiceProxyClient extends java.lang.Object implements SearchClient
When configuring the client using the Mk2Config scheme, this is the prefix to use in the .properties file. When using web.xml context parameters for configuration the configuration name has no effect.
ServiceProxyClient will acknowledge following configuration parameters:
Modifier and Type | Class and Description |
---|---|
class |
ServiceProxyClient.ProxyPz2ResponseHandler |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MODULENAME |
static java.lang.String |
SP_INIT_DOC_PATHS |
Constructor and Description |
---|
ServiceProxyClient() |
Modifier and Type | Method and Description |
---|---|
ServiceProxyClient |
cloneMe() |
void |
configure(ConfigurationReader configReader)
Configures the Configurable using the configuration obtained by the
provided configuration reader
|
java.util.List<java.lang.String> |
documentConfiguration()
The components documentation of how it was configured.
|
HttpResponseWrapper |
executeCommand(Pazpar2Command command)
Issues the provided command against the selected Pazpar2 service.
|
Configuration |
getConfiguration()
Returns the current client configuration - mainly for error resolution.
|
java.util.Map<java.lang.String,java.lang.String> |
getDefaults()
Returns default configuration parameters for the client.
|
java.util.List<java.lang.String> |
getInitDocPaths() |
java.lang.String |
getModuleName()
Returns the configuration name of the client
|
java.lang.String |
getReasonPhrase() |
java.lang.String |
getServiceUrl()
Returns the URL of the currently selected Pazpar2/SP service
|
int |
getStatusCode() |
boolean |
hasServiceUrl()
Returns true if a Service Proxy URL was defined yet.
|
boolean |
isAuthenticatingClient()
Basically says if this client accesses a Service Proxy, which (usually)
requires some form of authentication, or Pazpar2, which don't.
|
HttpResponseWrapper |
postInitDoc(byte[] initDoc,
Pazpar2Command command) |
ClientCommandResponse |
postInitDoc(java.lang.String filePath) |
ClientCommandResponse |
send(Pazpar2Command command)
Makes the request
|
void |
setSearchCommand(Pazpar2Command command)
Does nothing in Service Proxy context
|
void |
setServiceUrl(java.lang.String url)
Sets the URL of the Service Proxy that should service requests.
|
public static final java.lang.String MODULENAME
public static final java.lang.String SP_INIT_DOC_PATHS
public void configure(ConfigurationReader configReader) throws MissingConfigurationContextException
Configurable
configure
in interface Configurable
configReader
- used for reading the configurationMissingConfigurationContextException
public boolean isAuthenticatingClient()
SearchClient
isAuthenticatingClient
in interface SearchClient
public ClientCommandResponse send(Pazpar2Command command)
request
- org.apache.http.client.ClientProtocolException
java.io.IOException
public int getStatusCode()
public java.lang.String getReasonPhrase()
public void setSearchCommand(Pazpar2Command command)
setSearchCommand
in interface SearchClient
public HttpResponseWrapper executeCommand(Pazpar2Command command)
SearchClient
executeCommand
in interface SearchClient
public ServiceProxyClient cloneMe()
cloneMe
in interface SearchClient
public java.util.Map<java.lang.String,java.lang.String> getDefaults()
getDefaults
in interface Configurable
public java.lang.String getModuleName()
getModuleName
in interface Configurable
public java.util.List<java.lang.String> documentConfiguration()
Configurable
documentConfiguration
in interface Configurable
public ClientCommandResponse postInitDoc(java.lang.String filePath) throws java.io.IOException
java.io.IOException
public java.util.List<java.lang.String> getInitDocPaths()
public HttpResponseWrapper postInitDoc(byte[] initDoc, Pazpar2Command command)
public void setServiceUrl(java.lang.String url)
setServiceUrl
in interface SearchClient
public Configuration getConfiguration()
SearchClient
getConfiguration
in interface SearchClient
public java.lang.String getServiceUrl()
SearchClient
getServiceUrl
in interface SearchClient
public boolean hasServiceUrl()
hasServiceUrl
in interface SearchClient