01: package test.crispy.example.service;
02:
03: import java.rmi.RemoteException;
04: import java.rmi.server.UnicastRemoteObject;
05:
06: import net.sf.crispy.InvocationException;
07:
08: import test.crispy.example.model.Kunde;
09: import test.crispy.example.model.Primitive;
10:
11: public class RemoteEchoImpl extends UnicastRemoteObject implements
12: RemoteEcho {
13:
14: private static final long serialVersionUID = 985378781246727L;
15:
16: public RemoteEchoImpl() throws RemoteException {
17: super ();
18: }
19:
20: public String ping() throws RemoteException {
21: return PING_STRING;
22: }
23:
24: public String echo(String pvEchoString) throws RemoteException {
25: return pvEchoString;
26: }
27:
28: public Primitive echoPrimitive(Primitive pvPrimitive)
29: throws RemoteException {
30: return pvPrimitive;
31: }
32:
33: public Kunde renameKunde(Kunde pvKunde, String pvNewName)
34: throws RemoteException {
35: if (pvKunde == null) {
36: return null;
37: }
38: pvKunde.setName(pvNewName);
39: return pvKunde;
40: }
41:
42: public String throwException(String pvMessage)
43: throws RemoteException {
44: throw new InvocationException("Test Remote-Exception: "
45: + pvMessage);
46: }
47:
48: }
|