Criado por David Utza
aproximadamente 8 anos atrás
|
||
import java.rmi.Naming;import java.rmi.registry.LocateRegistry;/** * Klasse EchoServer * * @version 2016-09-09 * @author David */public class EchoServer { private EchoObject eo;// private List<EchoObject> clients; public EchoServer() { try { eo = new EchoObject(); System.out.println("Der Server ist aktiv!"); LocateRegistry.createRegistry(1099); Naming.rebind("rmi://localhost:1099/testObject", eo); } catch (Exception e) { e.printStackTrace(); System.out.println("\nException"); } } public EchoObject getEchoObject() { EchoObject result; result = eo; return result; } public static void main (String[] args) { EchoServer es = new EchoServer(); }}
Quer criar suas próprias Notas gratuitas com a GoConqr? Saiba mais.