Initial commit 🎉
fbshipit-source-id: b6fc29740c6875d2e78953b8a7123890a67930f2 Co-authored-by: Sebastian McKenzie <sebmck@fb.com> Co-authored-by: John Knox <jknox@fb.com> Co-authored-by: Emil Sjölander <emilsj@fb.com> Co-authored-by: Pritesh Nandgaonkar <prit91@fb.com>
This commit is contained in:
37
android/core/SonarConnection.java
Normal file
37
android/core/SonarConnection.java
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 2018-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*
|
||||
*/
|
||||
package com.facebook.sonar.core;
|
||||
|
||||
/**
|
||||
* A connection between a SonarPlugin and the desktop Sonar application. Register request handlers
|
||||
* to respond to calls made by the desktop application or directly send messages to the desktop
|
||||
* application.
|
||||
*/
|
||||
public interface SonarConnection {
|
||||
|
||||
/**
|
||||
* Call a remote method on the Sonar desktop application, passing an optional JSON object as a
|
||||
* parameter.
|
||||
*/
|
||||
void send(String method, SonarObject params);
|
||||
|
||||
/**
|
||||
* Call a remote method on the Sonar desktop application, passing an optional JSON array as a
|
||||
* parameter.
|
||||
*/
|
||||
void send(String method, SonarArray params);
|
||||
|
||||
/** Report client error */
|
||||
void reportError(Throwable throwable);
|
||||
|
||||
/**
|
||||
* Register a receiver for a remote method call issued by the Sonar desktop application. The
|
||||
* SonarReceiver is passed a responder to respond back to the desktop application.
|
||||
*/
|
||||
void receive(String method, SonarReceiver receiver);
|
||||
}
|
||||
Reference in New Issue
Block a user