com.indexdata.masterkey.pazpar2.client
Class Pazpar2ClientTorus

java.lang.Object
  extended by com.indexdata.masterkey.pazpar2.client.AbstractPazpar2Client
      extended by com.indexdata.masterkey.pazpar2.client.Pazpar2ClientTorus
All Implemented Interfaces:
Pazpar2Client

public class Pazpar2ClientTorus
extends AbstractPazpar2Client

Creates a Pazpar2 client with settings retrieved from the torus

Author:
jakub

Nested Class Summary
 
Nested classes/interfaces inherited from class com.indexdata.masterkey.pazpar2.client.AbstractPazpar2Client
AbstractPazpar2Client.HttpResponse
 
Field Summary
 
Fields inherited from class com.indexdata.masterkey.pazpar2.client.AbstractPazpar2Client
cfg, pazpar2Session, serviceDefinition, XML_CT
 
Constructor Summary
Pazpar2ClientTorus(Pazpar2ClientConfiguration cfg)
          Instantiates MODE 2 client
Pazpar2ClientTorus(Pazpar2ClientConfiguration proxyCfg, String realm)
          Instantiates MODE 3 client
 
Method Summary
 Pazpar2Client cloneMe()
          Creates a Pazpar2 client clone with the same Pazpar2 configuration and target settings as the original.
 Pazpar2Settings getSettings()
           
 void init()
          Initializes a Pazpar2 sessions while clearing any statically defined databases from Pazpar2's configuration and loading and from the target repository and setting them up on the session.
protected  boolean requiresForcedInit()
          Applies torus query for target selection and/or record filter to selected targets.
 
Methods inherited from class com.indexdata.masterkey.pazpar2.client.AbstractPazpar2Client
executeCommand, executeSearch, getHit, getResults, getSearchCommand, getSearchCount, getSessionId, getTimeStamp, pipeStream, recordRequest, recordRequest, request, searchRequest, sendInit, sendInit, sendRequest, sessionIsAlive, setSearchCommand, showRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pazpar2ClientTorus

public Pazpar2ClientTorus(Pazpar2ClientConfiguration cfg)
                   throws ProxyErrorException
Instantiates MODE 2 client

Parameters:
cfg -
Throws:
ProxyErrorException

Pazpar2ClientTorus

public Pazpar2ClientTorus(Pazpar2ClientConfiguration proxyCfg,
                          String realm)
                   throws ProxyErrorException
Instantiates MODE 3 client

Parameters:
proxyCfg -
realm -
Throws:
ProxyErrorException
Method Detail

getSettings

public Pazpar2Settings getSettings()
Returns:
The Pazpar2 target settings for the current session

requiresForcedInit

protected boolean requiresForcedInit()
Applies torus query for target selection and/or record filter to selected targets.

Specified by:
requiresForcedInit in class AbstractPazpar2Client

init

public void init()
          throws Pazpar2IOException,
                 Pazpar2ErrorException
Initializes a Pazpar2 sessions while clearing any statically defined databases from Pazpar2's configuration and loading and from the target repository and setting them up on the session.

Throws:
Pazpar2ErrorException - on pazpar2 application-level errors
Pazpar2IOException

cloneMe

public Pazpar2Client cloneMe()
                      throws ProxyErrorException,
                             Pazpar2ErrorException,
                             Pazpar2IOException
Description copied from interface: Pazpar2Client
Creates a Pazpar2 client clone with the same Pazpar2 configuration and target settings as the original. The client will be initialized but no search state is copied over from the original. The cloned client can be used by plug-ins to make pazpar2 requests independently of RelayPlugins master pazpar2 session.

Returns:
Uninitialized clone of this client
Throws:
ProxyErrorException
Pazpar2ErrorException
Pazpar2IOException


Copyright © 2012. All Rights Reserved.