small changes to factory and implemented rmi awareness with a simple register/deregister program
This commit is contained in:
28
rmi_Awareness/LaunchServer.java
Normal file
28
rmi_Awareness/LaunchServer.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package rmi_Awareness;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
import java.rmi.registry.LocateRegistry;
|
||||
import java.rmi.registry.Registry;
|
||||
|
||||
/**
|
||||
* Created by Giovanni on 01/12/2014.
|
||||
*/
|
||||
public class LaunchServer {
|
||||
|
||||
public static void main (String[] args){
|
||||
|
||||
try {
|
||||
HelloInterface h = new HelloImplemented();
|
||||
Registry r = LocateRegistry.getRegistry();
|
||||
r.rebind("HelloServer",h);
|
||||
|
||||
|
||||
|
||||
} catch (RemoteException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user