unitrequestor
Class ReqSearchInterface

java.lang.Object
  |
  +--unitrequestor.ReqSearchInterface
All Implemented Interfaces:
IUnitRequest

public class ReqSearchInterface
extends java.lang.Object
implements IUnitRequest

Title: Implementation of the IUnitRequest (package unitloader)

Class implementing IUnitRequest to create distributed search queries based on the BioCASE protocol. This class is used for the implementation of a simple jsp based web demonstrator for GBIF-D and BioCASE.
The continueProcessing method implements a logging function and sends the complete resultset back as an email.
Please note that for different applications a different implementation of the IUnitRequest interface will probably be required.

Version:
0.9, May 2003
Author:
Anton Güntsch, Botanic Garden and Botanical Museum Berlin-Dahlem

Field Summary
private  java.lang.String emailAdr
           
private  int okResp
           
private  java.util.ArrayList providers
           
private  java.lang.String request
           
private  int timeout
           
private  int wait
           
 
Constructor Summary
ReqSearchInterface(java.util.ArrayList providers, java.lang.String request, int timeout, int wait, int okResp)
          Overloaded constructor creating a search request (no email parameter)
ReqSearchInterface(java.util.ArrayList providers, java.lang.String emailAdr, java.lang.String request, int timeout, int wait, int okResp)
          Overloaded constructor creating a search request (including email parameter)
 
Method Summary
 void contProcessing(java.util.List resultList)
          Implementation of the contProcessing method doing some logging and sending back the resultset as an email if an email adress is given.
 java.util.List getIntermediate()
          Method to access an intermediate resultset waiting a few seconds and returning what has been returned.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

providers

private java.util.ArrayList providers

emailAdr

private java.lang.String emailAdr

request

private java.lang.String request

timeout

private int timeout

wait

private int wait

okResp

private int okResp
Constructor Detail

ReqSearchInterface

public ReqSearchInterface(java.util.ArrayList providers,
                          java.lang.String emailAdr,
                          java.lang.String request,
                          int timeout,
                          int wait,
                          int okResp)
Overloaded constructor creating a search request (including email parameter)
Parameters:
providers - list of unit level providers (package unitloader).
emailAdr - email address for sending back the resultset.
request - a BioCASE protroco compliant xml request.
timeout - timeout in milliseconds.
wait - time in millisec. to wait before accessing the resultlist

ReqSearchInterface

public ReqSearchInterface(java.util.ArrayList providers,
                          java.lang.String request,
                          int timeout,
                          int wait,
                          int okResp)
Overloaded constructor creating a search request (no email parameter)
Parameters:
providers - list of unit level providers (package unitloader).
request - a BioCASE protroco compliant xml request.
timeout - timeout for http connection in milliseconds.
wait - time in millisec. to wait before accessing the resultlist
okResp - number of responses required before continuing
Method Detail

getIntermediate

public java.util.List getIntermediate()
Method to access an intermediate resultset waiting a few seconds and returning what has been returned.
Returns:
list of response objects (package unitloader).

contProcessing

public void contProcessing(java.util.List resultList)
Implementation of the contProcessing method doing some logging and sending back the resultset as an email if an email adress is given.
Specified by:
contProcessing in interface IUnitRequest
Parameters:
resultList -