Skip to content

Commit

Permalink
Add example for fancy wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Duckelekuuk committed Aug 24, 2023
1 parent 6bf4fcc commit aca74f4
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
import com.rpcnis.base.defaults.LoopbackTransport;
import com.rpcnis.core.Rpcnis;

import java.util.concurrent.CompletableFuture;

public class SendingUpdateMethod {

public static void main(String[] args) {
Rpcnis rpcNis = new Rpcnis(new LoopbackTransport());
MathFunctions mathFunctions = rpcNis.registerProcedures(MathFunctions.class);
MathFunctions mathFunctions2 = rpcNis.registerProcedures(MathFunctions.class, "Cooler-math-functions");


int result = mathFunctions.add(1, 2, 3, 4, 5);
Expand All @@ -18,5 +21,6 @@ public interface MathFunctions {
int multiply(int x, int times);
int add(int... numbers);
int substract(int from, int... numbers);
CompletableFuture<Integer> calculateMeaningOfLife();
}
}

0 comments on commit aca74f4

Please sign in to comment.