unitrequestor
Class ReqSearch

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

public class ReqSearch
extends java.lang.Object
implements IUnitRequest

Title: Example implementation of IUnitRequest (package unitloader)

Example class implementing IUnitRequest to query a set of distributed BioCASE providers on the world wide web. The code shows how to create a search request and its xml representation. The contProcessing method (required when implementing the IUnitRequest interface) does two things in this example:

a) logging a message for PosterThreads not returning a reponse document in time.
b) sending the list of responses as an email.

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

Field Summary
private  java.util.ArrayList providers
           
private  java.lang.String request
           
private  int timeout
           
 
Constructor Summary
ReqSearch()
          Constructor creating a search request.
 
Method Summary
 void contProcessing(java.util.List resultList)
          Implementation of the contProcessing method which is called once all threads returned.
private  void createProviderList()
           
private static QBool createQuery()
           
private static QBool createQuery0()
           
private static Comp createQuery2()
           
private static QBool createQuery3()
           
private static Comp createQuery4()
           
private  void createSingleProvider()
           
 void go()
          Example method dumping some intermediate results to the screen.
 
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

request

private java.lang.String request

timeout

private int timeout
Constructor Detail

ReqSearch

public ReqSearch()
Constructor creating a search request.
Method Detail

go

public void go()
Example method dumping some intermediate results to the screen.

contProcessing

public void contProcessing(java.util.List resultList)
Implementation of the contProcessing method which is called once all threads returned. Here, the method does some logging and sends the resulting documents as an email.
Specified by:
contProcessing in interface IUnitRequest
Parameters:
resultList - list of response objects (package unitloader).

createQuery

private static QBool createQuery()

createQuery0

private static QBool createQuery0()

createQuery2

private static Comp createQuery2()

createQuery3

private static QBool createQuery3()

createQuery4

private static Comp createQuery4()

createProviderList

private void createProviderList()

createSingleProvider

private void createSingleProvider()