Kotlinify RequestOnlyHandler (#43743)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43743

Changelog: [Internal]

As part of the Sustainability Week (see [post](https://fb.workplace.com/groups/251759413609061/permalink/742797531171911/)).

Reviewed By: tdn120

Differential Revision: D55588782

fbshipit-source-id: 89f15fb55eaa338be97c938d6b23c3e77ce610f0
This commit is contained in:
Fabrizio Cucci
2024-04-02 16:17:39 -07:00
committed by Facebook GitHub Bot
parent 7d60f403f9
commit 7b302dc8bd
2 changed files with 19 additions and 23 deletions
@@ -1,23 +0,0 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* 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.react.packagerconnection;
import androidx.annotation.Nullable;
import com.facebook.common.logging.FLog;
import com.facebook.infer.annotation.Nullsafe;
@Nullsafe(Nullsafe.Mode.LOCAL)
public abstract class RequestOnlyHandler implements RequestHandler {
private static final String TAG = JSPackagerClient.class.getSimpleName();
public abstract void onRequest(@Nullable Object params, Responder responder);
public final void onNotification(@Nullable Object params) {
FLog.e(TAG, "Notification is not supported");
}
}
@@ -0,0 +1,19 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* 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.react.packagerconnection
import com.facebook.common.logging.FLog
public abstract class RequestOnlyHandler : RequestHandler {
override abstract fun onRequest(params: Any?, responder: Responder)
override final fun onNotification(params: Any?) {
FLog.e(JSPackagerClient::class.java.simpleName, "Notification is not supported")
}
}