| Hint | Answer | % Correct |
|---|---|---|
| }end | 100%
| |
| }end | 100%
| |
| }end | 100%
| |
| }end | 100%
| |
| }end | 100%
| |
| }end | 100%
| |
| }end | 100%
| |
| }end | 100%
| |
| }end | 100%
| |
| Look up remote object on registry | ObjectClass object = (ObjectClass) registry.lookup(“name”); | 100%
|
| RMI interface | public interface InterfaceClass extends Remote{ | 100%
|
| Bind RMI object to registry | Registry.bind(“name”, object); | 100%
|
| Create registry | Registry registry = LocateRegistry.createRegistry(port); | 100%
|
| Get registry | Registry registry = LocateRegistry.getRegistry(host, port); | 100%
|
| void method() throws RemoteException; | 100%
| |
| catch(IOException e) { | 0%
| |
| } catch (RemoteException e){ | 0%
| |
| Handle socket errors | catch(UnknownHostException e){ | 0%
|
| Extending thread class (MyThread, runThread()) | class MyThread extends Thread{ | 0%
|
| Implementing Runnable (MyThread, runThread()) | class MyThread implements Runnable{ | 0%
|
| Implementing interface | class ObjectClass implements InterfaceClass { | 0%
|
| Close socket | client.close(); | 0%
|
| Create socket object for client | client = new Socket( server, port); | 0%
|
| DataInputStream is; | 0%
| |
| DataOutputStream os; | 0%
| |
| Handle(); | 0%
| |
| handle(); | 0%
| |
| handle(); | 0%
| |
| is.close(); | 0%
| |
| Create IO streams for communication | is = new DataInputStream(client.getInputStream()); | 0%
|
| Instantiate and start a thread (one line) | new MyThread().start(); | 0%
|
| ObjectClass.method(); | 0%
| |
| os.close(); | 0%
| |
| os = new DataOutputStream(client.getOutputStream()); | 0%
| |
| os.writeBytes("message"); | 0%
| |
| @ Override | 0%
| |
| public void method() throws RemoteException{start}end | 0%
| |
| public void run(){ | 0%
| |
| public void run(){ | 0%
| |
| runThread(); | 0%
| |
| runThread(); | 0%
| |
| server = new ServerSocket(port); | 0%
| |
| Open server socket | ServerSocket server; | 0%
|
| Wait for client request | Socket client = server.accept(); | 0%
|
| Perform communication | String line = is.readLine(); | 0%
|
| Set Priority of a thread | ThreadName.setPriority(priority) | 0%
|
| Handle an error | Try { | 0%
|