¡GoConqr estrena diseño! Cuéntanos qué te parece.

Apuntes

EchoObject

David Utza Informatik Alemán 1 página

Contenido del apunte (1)

Página 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";

}

}

Información

Descripción
EchoObject
Creado por
David Utza · sep 2016
Actualizado
10 sep 2016
Visitas
13
Etiquetas
echoobject
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?