public class QueryMonitorPluginImpl extends Object implements QueryMonitorPlugin
| Constructor and Description |
|---|
QueryMonitorPluginImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addActiveSearch(ActiveSearch activeSearch)
Adds an ActiveSearch to the
ActiveSearch Map |
Map<UUID,ActiveSearch> |
getActiveSearches()
Returns a copy of the
ActiveSearch Map |
QueryResponse |
process(QueryResponse input)
Method that is implemented for
PostFederatedQueryPlugin. |
QueryRequest |
process(Source source,
QueryRequest input)
Method that is implemented for
PreFederatedQueryPlugin. |
boolean |
removeActiveSearch(UUID uniqueID)
Removes an ActiveSearch from the
ActiveSearch Map using it's UUID as a key |
void |
setRemoveSearchAfterComplete(boolean removeSearchAfterComplete)
Sets a boolean which determines whether or not searches will be removed from the
ActiveSearch Map upon search completion. |
public static final String SEARCH_ID
public Map<UUID,ActiveSearch> getActiveSearches()
ActiveSearch MapgetActiveSearches in interface QueryMonitorPluginMap <UUID, ActiveSearch> copy of the ActiveSearch
Mappublic void setRemoveSearchAfterComplete(boolean removeSearchAfterComplete)
ActiveSearch Map upon search completion. A value of true will remove searches from the
Map as the searches finish and a value of false will keep the searches in the Map after they complete.setRemoveSearchAfterComplete in interface QueryMonitorPluginremoveSearchAfterComplete - boolean value. A value of false will keep ActiveSearch's in the Map
even after they finish (are no longer active). True will remove the ActiveSearches from the
Map as the searches complete (default behavior is true)public boolean addActiveSearch(ActiveSearch activeSearch)
ActiveSearch MapaddActiveSearch in interface QueryMonitorPluginactiveSearch - ActiveSearch that will be added to the MapActiveSearch was successfulpublic boolean removeActiveSearch(UUID uniqueID)
ActiveSearch Map using it's UUID as a keyremoveActiveSearch in interface QueryMonitorPluginuniqueID - java.util.UUID that corresponds to the ActiveSearch to be removed from the MapMap was successfulpublic QueryRequest process(Source source, QueryRequest input) throws PluginExecutionException, StopProcessingException
PreFederatedQueryPlugin. Uses the given Source
and QueryRequest information to create a new ActiveSearch to add to the ActiveSearch Map.process in interface PreFederatedQueryPluginsource - Source that corresponds to source the search is queryinginput - QueryRequest that corresponds to request generated when a user queried the
sourceQueryRequest that was given as a parameter with updated property information
corresponding to the ActiveSearch's UUIDPluginExecutionException - thrown when an error occurs while processing the QueryRequestStopProcessingException - thrown to halt processing when a critical issue occurs during
processing. This is intended to prevent other plugins from processing as well.public QueryResponse process(QueryResponse input) throws PluginExecutionException, StopProcessingException
PostFederatedQueryPlugin. Uses the given QueryResponse information to remove the ActiveSearch from the ActiveSearch
Map.process in interface PostFederatedQueryPlugininput - QueryResponse that corresponds to response from the source that was
queried by the user's original QueryRequestQueryResponse that was given as a parameterPluginExecutionException - thrown when an error occurs while processing the QueryResponseStopProcessingException - thrown to halt processing when a critical issue occurs during
processing. This is intended to prevent other plugins from processing as well.This work is licensed under a Creative Commons Attribution 4.0 International License.