Session 7 Crisis and Risk Communication Session 7 Slide Deck Slide 7-1.
Session 7
-
Upload
pradeep-sripada -
Category
Technology
-
view
188 -
download
2
Transcript of Session 7
![Page 1: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/1.jpg)
Session 7
.NET Remoting II
![Page 2: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/2.jpg)
.NET Remoting II/ 2 of 21
Session Objectives Discuss the three types of Remoting
classes Explain passing objects to remote
methods Explain asynchronous calls to a
remote method Discuss Lifetime management
in .NET Remoting
![Page 3: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/3.jpg)
.NET Remoting II/ 3 of 21
Passing objects to Remote methods (1)
In .NET remoting, the classes of the objects that can be passed as parameters to remote methods arecategorized as –
Marshal by reference Marshal by value Non-Remotable
![Page 4: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/4.jpg)
.NET Remoting II/ 4 of 21
Passing objects to Remote methods (2) Example 1 -
Contd…
![Page 5: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/5.jpg)
.NET Remoting II/ 5 of 21
Passing objects to Remote methods (3)
Contd…
![Page 6: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/6.jpg)
.NET Remoting II/ 6 of 21
Inheriting from class System.MarshalByRefObject Example 2 -
Contd…
![Page 7: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/7.jpg)
.NET Remoting II/ 7 of 21
Inheriting from class System.MarshalByRefObject
Contd…
![Page 8: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/8.jpg)
.NET Remoting II/ 8 of 21
Methods that return objects Example 3 -
![Page 9: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/9.jpg)
.NET Remoting II/ 9 of 21
Remoting Server Example 4 -
![Page 10: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/10.jpg)
.NET Remoting II/ 10 of 21
Building a client Example 5 -
![Page 11: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/11.jpg)
.NET Remoting II/ 11 of 21
Output After executing example 4
followed by example 5
![Page 12: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/12.jpg)
.NET Remoting II/ 12 of 21
Executing the client Client console in example 5 will
resemble -
![Page 13: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/13.jpg)
.NET Remoting II/ 13 of 21
Asynchronous Remoting
Client makes a call to a method and then continues to perform other tasks
When the server is available it processes the method and returns the result to the client at a later time
![Page 14: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/14.jpg)
.NET Remoting II/ 14 of 21
Asynchronous Remoting Example 6 -
![Page 15: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/15.jpg)
.NET Remoting II/ 15 of 21
Lifetime Management -1 Lifetime management holds good
for clients that are activated as Singleton objects
Properties configured for Lifetime management -
![Page 16: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/16.jpg)
.NET Remoting II/ 16 of 21
Lifetime Management -2 Example 7 -
Contd…
![Page 17: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/17.jpg)
.NET Remoting II/ 17 of 21
Contd…
Lifetime Management -3
![Page 18: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/18.jpg)
.NET Remoting II/ 18 of 21
Lifetime Management -4 Modification -
![Page 19: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/19.jpg)
.NET Remoting II/ 19 of 21
Example 5 - Modified Example 8 -
Contd…
![Page 20: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/20.jpg)
.NET Remoting II/ 20 of 21
Example 5 - ModifiedContd…
![Page 21: Session 7](https://reader035.fdocuments.in/reader035/viewer/2022081602/556d09ecd8b42ad34f8b4b2b/html5/thumbnails/21.jpg)
.NET Remoting II/ 21 of 21
Example 8 - Output