Include request and response subscription methods to the AnalysisServer interface.

Previously in the downstream intellij-plugins repo we added the ResponseListener methods
https://github.com/JetBrains/intellij-plugins/commit/d6a6512b6ea0f1faee3cebd6c05271bed9369b99.
Mirroring them upstream in the code generation tool will ensure that the
two interface versions do not diverge. Additionally, we'd like the
ability to correlate requests and responses to do things like measuring
roundtrip times. Adding symmetric request subscription hooks to the API
will allow us to accomplish that.

R=scheglov@google.com

Change-Id: Ia940ff014ab06db7aa9335a904c0003dc1316c5a
Reviewed-on: https://dart-review.googlesource.com/c/86583
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Ari Aye <ariaye@google.com>
This commit is contained in:
lambdabaa
2018-12-07 19:35:17 +00:00
committed by commit-bot@chromium.org
parent 5074dc9033
commit 3e8d87b59d
2 changed files with 85 additions and 0 deletions
@@ -30,6 +30,22 @@ public interface AnalysisServer {
*/
public void addAnalysisServerListener(AnalysisServerListener listener);
/**
* Add the given listener to the list of listeners that will receive notification when
* requests are made by an analysis server client.
*
* @param listener the listener to be added
*/
public void addRequestListener(RequestListener listener);
/**
* Add the given listener to the list of listeners that will receive notification when
* responses are received by an analysis server client.
*
* @param listener the listener to be added
*/
public void addResponseListener(ResponseListener listener);
/**
* Add the given listener to the list of listeners that will receive notification when the server
* is not active
@@ -748,6 +764,22 @@ public interface AnalysisServer {
*/
public void removeAnalysisServerListener(AnalysisServerListener listener);
/**
* Remove the given listener from the list of listeners that will receive notification when
* requests are made by an analysis server client.
*
* @param listener the listener to be removed
*/
public void removeRequestListener(RequestListener listener);
/**
* Remove the given listener from the list of listeners that will receive notification when
* responses are received by an analysis server client.
*
* @param listener the listener to be removed
*/
public void removeResponseListener(ResponseListener listener);
/**
* {@code search.findElementReferences}
*