blob: 85f52ee2c51f9b4e3c9df4a9c5ca7f7ad674fa02 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
import com.yahoo.jrt.*;
public class RPCServer {
public static void main(String[] args) {
if (args.length != 1) {
System.err.println("usage: RPCServer <spec>");
System.exit(1);
}
Supervisor orb = new Supervisor(new Transport());
try {
orb.listen(new Spec(args[0]));
} catch (ListenFailedException e) {
System.err.println("could not listen at " + args[0]);
System.exit(1);
}
orb.transport().join();
}
}
|