|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.federated.FederatedQueryProcessor
Performs a multi-source or "federated" search.
Dispatches query request to multiple IQueryProcessors.
Collects and organizes the responses.
Uses the composite pattern: FederatedQueryProcessor IS an IQueryProcessor so that it can be used where any IQueryProcessor can.
| Field Summary |
| Fields inherited from interface com.raritantechnologies.federated.IFederatedQueryProcessor |
FULL_RESULTS, NO_RESULTS, PARTIAL_RESULTS |
| Constructor Summary | |
FederatedQueryProcessor()
|
|
| Method Summary | |
void |
addErrorMessage(java.lang.String message)
|
void |
addMessage(java.lang.String message)
|
void |
addResults(IResultSet newResults,
java.lang.String sourceName)
|
IResultSet |
executeQuery(java.lang.Integer queryID,
ISearchFieldMap searchMap,
SourceLoginInfo[] sources,
OrderedMap inputParameters,
java.lang.Integer pageSize,
java.lang.Integer startRec)
Implementation of executeQuery( ) Starts queries in their own thread based on number of sources Accumulates results from workers in its own FederatedResultSet |
IResultSet |
getCurrentResults()
|
int |
getCurrentThreadCount()
|
int |
getErrorCount()
|
java.util.Iterator |
getErrorMessages()
|
com.raritantechnologies.federated.FederatedRunner |
getFederatedRunner(int i)
|
java.lang.String |
getLastSourceToFinish()
|
int |
getMessageCount()
|
java.util.Iterator |
getMessages()
|
int |
getResultState()
|
int |
getThreadCount()
|
void |
searchDone(java.lang.String sourceName)
|
void |
setResultCallBack(java.lang.Object obj,
java.lang.String methodName)
This registers a callback triggered after every result is returned |
void |
setSourceCallBack(java.lang.Object obj,
java.lang.String methodName)
This sets up a callback triggered after every source returns |
void |
setTimeouts(int[] t)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FederatedQueryProcessor()
| Method Detail |
public IResultSet executeQuery(java.lang.Integer queryID,
ISearchFieldMap searchMap,
SourceLoginInfo[] sources,
OrderedMap inputParameters,
java.lang.Integer pageSize,
java.lang.Integer startRec)
throws QueryProcessorException
executeQuery in interface IQueryProcessorqueryID - Unique ID for this query. Used by front end to manage queries and
query pages. QueryProcessor may use this parameter to organize its search results, and
to organize any state information it needs to process future page requests
(future executeQuery( ) calls with the same queryID.searchMap - Provides mapping information needed to translate the inputParameters
into a search string appropriate for this type of QueryProcessor.
Mapping information is obtained by the application framework from
local configuration data.sources - The LoginInfo and SearchSource(s) to be used for this query. The SearchSource(s)
must be of the appropriate type for the QueryProcessor.inputParameters - Form inputs. Use ISearchFieldMap to translate these into
implementation and source-specific fields.pageSize - Integer specifying the number of results to include in the returned
Document.
if null - use the default page size.startRec - Integer specifying the starting record in the result set to be returned.
if null - start with the first record.
QueryProcessorExceptionpublic void setTimeouts(int[] t)
public void searchDone(java.lang.String sourceName)
public java.lang.String getLastSourceToFinish()
public IResultSet getCurrentResults()
getCurrentResults in interface IFederatedQueryProcessor
public void addResults(IResultSet newResults,
java.lang.String sourceName)
public void addMessage(java.lang.String message)
public int getMessageCount()
public java.util.Iterator getMessages()
public void addErrorMessage(java.lang.String message)
public int getErrorCount()
public java.util.Iterator getErrorMessages()
public void setSourceCallBack(java.lang.Object obj,
java.lang.String methodName)
public void setResultCallBack(java.lang.Object obj,
java.lang.String methodName)
public com.raritantechnologies.federated.FederatedRunner getFederatedRunner(int i)
public int getThreadCount()
public int getCurrentThreadCount()
public int getResultState()
getResultState in interface IFederatedQueryProcessor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||