Work flow element implementations are responsible for managing the persistent searches that they are currently handling.
Typically, a work flow element search operation will first decode the persistent search control and construct a new {@code PersistentSearch}.
Once the initial search result set has been returned and no errors encountered, the work flow element implementation should register a cancellation callback which will be invoked when the persistent search is cancelled. This is achieved using {@link #registerCancellationCallback(CancellationCallback)}. The callback should make sure that any resources associated with the {@code PersistentSearch} are released. This may included removingthe {@code PersistentSearch} from a list, or abandoning apersistent search operation that has been sent to a remote server.
Finally, the {@code PersistentSearch} should be enabled using{@link #enable()}. This method will register the {@code PersistentSearch} with the client connection and notify theunderlying search operation that no result should be sent to the client.
Work flow element implementations should {@link #cancel()} activepersistent searches when the work flow element fails or is shut down.
|
|
|
|