unitrequestor
Class ReqScan

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

public class ReqScan
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 scan 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
ReqScan()
          Constructor creating a scan 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  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

ReqScan

public ReqScan()
Constructor creating a scan 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).

createProviderList

private void createProviderList()

createSingleProvider

private void createSingleProvider()