diff --git a/rmi_hello_world/HelloWorldImpl.java b/rmi_hello_world/HelloWorldImpl.java new file mode 100644 index 0000000..ad02e96 --- /dev/null +++ b/rmi_hello_world/HelloWorldImpl.java @@ -0,0 +1,22 @@ +package rmi_hello_world; + +import java.rmi.RemoteException; +import java.rmi.server.UnicastRemoteObject; + +/** + * Created by Giovanni on 09/11/2014. + */ +public class HelloWorldImpl extends UnicastRemoteObject implements HelloWorldInterface { + + private static final long serialVersionUID = 5184834L; + + public HelloWorldImpl()throws RemoteException { + + } + + @Override + public String stampa(String in) throws RemoteException { + System.out.print(in); + return in; + } +} diff --git a/rmi_hello_world/HelloWorldInterface.java b/rmi_hello_world/HelloWorldInterface.java new file mode 100644 index 0000000..de9faab --- /dev/null +++ b/rmi_hello_world/HelloWorldInterface.java @@ -0,0 +1,14 @@ +package rmi_hello_world; + +import java.rmi.Remote; +import java.rmi.RemoteException; + +/** + * Created by Giovanni on 09/11/2014. + */ +public interface HelloWorldInterface extends Remote { + + + String stampa (String in) throws RemoteException; + +} diff --git a/rmi_hello_world/Launch.java b/rmi_hello_world/Launch.java new file mode 100644 index 0000000..a0b30ed --- /dev/null +++ b/rmi_hello_world/Launch.java @@ -0,0 +1,39 @@ +package rmi_hello_world; + +import java.rmi.Naming; +import java.rmi.RMISecurityManager; +import java.rmi.RemoteException; +import java.rmi.registry.LocateRegistry; +import java.rmi.registry.Registry; +import java.util.logging.Logger; + +/** + * Created by Giovanni on 09/11/2014. + */ +public class Launch { + + + public static void main (String[] arg){ + + Logger l =Logger.getLogger("hellowordlogger"); + System.setSecurityManager(new RMISecurityManager()); + + try { + Registry registry = LocateRegistry.createRegistry(10000); + HelloWorldImpl obj = new HelloWorldImpl(); + l.info("Creato oggetto"); + registry.bind("HW",obj); + l.info("Oggetto registrato"); + + + } + catch (Exception e){ + e.printStackTrace(); + } + + + + } + + +} diff --git a/rmi_hello_world/jli.dll b/rmi_hello_world/jli.dll new file mode 100644 index 0000000..e198aae Binary files /dev/null and b/rmi_hello_world/jli.dll differ diff --git a/rmi_hello_world/rmiregistry.exe b/rmi_hello_world/rmiregistry.exe new file mode 100644 index 0000000..8591bac Binary files /dev/null and b/rmi_hello_world/rmiregistry.exe differ