Files
flipper/android/core/SonarConnection.java
Daniel Büchele fbbf8cf16b 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>
2018-06-01 11:03:58 +01:00

38 lines
1.1 KiB
Java

/*
* 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);
}