diff options
| author | unknown | 2013-11-29 09:50:28 +0100 |
|---|---|---|
| committer | unknown | 2013-11-29 09:50:28 +0100 |
| commit | 9b3cc41689348dfb8d46a4ed8a66541e9008b851 (patch) | |
| tree | 54c5dfa9d5743db048d33cfa66af8f60978277f0 /Dozentenmodul/src/rmi/RmiClientMethods.java | |
| parent | Dozentenmodulserver initales check-in (diff) | |
| download | tutor-module-9b3cc41689348dfb8d46a4ed8a66541e9008b851.tar.gz tutor-module-9b3cc41689348dfb8d46a4ed8a66541e9008b851.tar.xz tutor-module-9b3cc41689348dfb8d46a4ed8a66541e9008b851.zip | |
Test
Diffstat (limited to 'Dozentenmodul/src/rmi/RmiClientMethods.java')
| -rw-r--r-- | Dozentenmodul/src/rmi/RmiClientMethods.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Dozentenmodul/src/rmi/RmiClientMethods.java b/Dozentenmodul/src/rmi/RmiClientMethods.java new file mode 100644 index 00000000..58df1734 --- /dev/null +++ b/Dozentenmodul/src/rmi/RmiClientMethods.java @@ -0,0 +1,29 @@ +package rmi; +import java.rmi.*; +import server.*; + +public class RmiClientMethods { + + public ServerInterface getInterface() + { + String strName = "rmi://141.79.128.121:9999/TheRMIExample"; + System.out.println("Client: Looking up " + strName + "..."); + ServerInterface RMI = null; + + try + { + + RMI = (ServerInterface)Naming.lookup(strName); + + } + catch (Exception e) + { + System.out.println("Client: Exception thrown looking up " + strName); + System.out.println("Client: " + e.getMessage().toString()); + System.exit(1); + } + return RMI; + } + + +} |
