Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 1 Synchrone Methodenausführung.

Similar presentations


Presentation on theme: "Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 1 Synchrone Methodenausführung."— Presentation transcript:

1 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 1 Synchrone Methodenausführung

2 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 2 UML Sequenzdiagramme

3 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 3 account1 account2 bank1 bank2

4 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 4 account1 account2 bank1 bank2

5 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 5 UML Statecharts (asynchrone Ausführung)

6 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 6 account1 account2 bank1 bank2

7 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 7 account1 account2 bank1 bank2

8 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 8 UML Komponentendiagramme BankSystem Account Bank bs1 :BankSystembs2 :BankSystem Struktur Verhalten Daten

9 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 9 UML Deploymentdiagramme Struktur Verhalten Daten Server :Server bs1 :BankSystemws1 :Webserver daffy.kassel.de :Server bs2 :BankSystem

10 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 10

11 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 11

12 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 12

13 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 13 Calling a remote method class Bank { public void remoteTransferToBank2(Account account1, String account2, double amount) { XmlRpcClient xmlrpc = new XmlRpcClient ("http://www.bank2.de:8080/RPC2"); Vector params = new Vector (); params.addElement ("account2"); params.addElement (amount); // this method returns a boolean Boolean result = (Boolean) xmlrpc.execute ("remoteTransferFromBank1", params); } …

14 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 14 Server accepting remote calls class Bank { … public static void main (String [] args) { WebServer webserver = new WebServer (8080); webserver.addHandler ("transfers", new TransferHandler()); … }

15 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 15 Server accepting remote calls class TransferHandler implements XmlRpcHandler { … Object execute(XmlRpcRequest pRequest) throws XmlRpcException {XmlRpcRequestXmlRpcException switch (pRequest.getMethodName()) { case "remoteTransferFromBank1": localTransferFromBank1 ((String) pRequest.getParameter(0), (double) pRequest.getParameter(1)); break; …. }

16 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 16

17 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 17

18 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 18


Download ppt "Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 1 Synchrone Methodenausführung."

Similar presentations


Ads by Google