Presentation is loading. Please wait.

Presentation is loading. Please wait.

Concurrent Programming Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 1.

Similar presentations


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

1 Concurrent Programming Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 1

2 2 Synchrone Methodenausführung

3 runtime program

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

5 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 5 button leftbankrightbank app action

6 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 6 button leftbankrightbank app action timer

7 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 7 button leftbankrightbank app action timer

8 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 8 button leftbankrightbank app action timer

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

10 10

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

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

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

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

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

16 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 16 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); } …

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

18 Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 18 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; …. }

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

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

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

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

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


Download ppt "Concurrent Programming Programmiermethodik SS2006 © 2005 Albert Zündorf, University of Kassel 1."

Similar presentations


Ads by Google