GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Notizen

EchoObject

David Utza Informatik Deutsch 1 Seite

Inhalt der Notizen (1)

Seite 1

import java.rmi.*;

import java.rmi.server.UnicastRemoteObject;

/**

* Klasse EchoObject

*

*

*

* @version 2016-09-09

* @author David

*/

/** Tatsächlicher Server */

@SuppressWarnings("serial")

public class EchoObject extends UnicastRemoteObject implements EchoService

{

private String response;

private int uid = 0;

public EchoObject () throws RemoteException

{

super();

response = "";

}

public String getResponse () throws RemoteException

{

String result = null;

result = response;

System.out.println("Aufruf von getResponse()");

return result;

}

public void request (String request) throws RemoteException

{

response = request;

}

public int setouruid() throws RemoteException{

++uid;

System.out.println("ID gestzt: "+ uid);

return uid;

}

public String getc(int uid)throws RemoteException{

if (this.uid == uid) return "ID found "+ uid;

return "trouble";

}

}

Informationen

Beschreibung
EchoObject
Erstellt von
David Utza · Sep 2016
Aktualisiert
10 Sep 2016
Aufrufe
13
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck