GoConqr has a new look! Let us know what you think.

Notes

EchoServer

David Utza Informatik German 1 page

Content of the notes (1)

Page 1

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();

}

}

Information

Description
EchoServer
Created by
David Utza
Views
27
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?