aboutsummaryrefslogtreecommitdiffstats
path: root/rmi/RMIClient.java
blob: 60e25c89bbda5b6215ad81ec55a8ea82be25282f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * Created on 01-Mar-2016
 */
package rmi;

import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;

import common.MessageInfo;

public class RMIClient {
	public static void main(String[] args) {
		RMIServerI iRMIServer = null;

		// Check arguments for Server host and number of messages
		if(args.length < 2) {
			System.out.println("Needs 2 arguments: ServerHostName/IPAddress, TotalMessageCount");
			System.exit(-1);
		}

		String urlServer = new String("rmi://" + args[0] + "/RMIServer");
		int numMessages = Integer.parseInt(args[1]);

		// TO-DO: Initialise Security Manager

		// TO-DO: Bind to RMIServer

		// TO-DO: Attempt to send messages the specified number of times
	}
}