Package org.forgerock.am.cts.continuous
Interface ContinuousQuery
-
public interface ContinuousQuery
Interface for ensuring that continuous queries can be controlled once configured. A continuous query is expected to, once configured, run against a connection which will continually return data through the connection. AContinuousQueryListener
should be configured to react to events as they see them, though it is up to the underlying implementation to decide whether the listener should use eitherobjectChanged
orobjectsChanged
.- See Also:
ContinuousQueryListener
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ContinuousQuery
addContinuousQueryListener(ContinuousQueryListener listener)
Adds a generic listener to the set of objects that will be informed of changes according to the queried filter.ContinuousQuery
removeContinuousQueryListener(ContinuousQueryListener listener)
Removes a generic listener from the set of objects that will be informed of changes according to the queried filter.void
startQuery()
Begins the continuous query on the datastore.void
stopQuery()
Ends the continuous query on the datastore, removing any outstanding listeners.
-
-
-
Method Detail
-
startQuery
void startQuery() throws DataLayerException
Begins the continuous query on the datastore.- Throws:
DataLayerException
- if there were issues creating the connection and starting the query.
-
stopQuery
void stopQuery()
Ends the continuous query on the datastore, removing any outstanding listeners.
-
addContinuousQueryListener
ContinuousQuery addContinuousQueryListener(ContinuousQueryListener listener)
Adds a generic listener to the set of objects that will be informed of changes according to the queried filter.- Parameters:
listener
- ContinuousQueryListener that will respond to changes.- Returns:
- This instance of the ContinuousQuery.
-
removeContinuousQueryListener
ContinuousQuery removeContinuousQueryListener(ContinuousQueryListener listener)
Removes a generic listener from the set of objects that will be informed of changes according to the queried filter.- Parameters:
listener
- ContinuousQueryListener that will respond to changes.- Returns:
- This instance of the ContinuousQuery.
-
-