DocumentCode :
3642457
Title :
The use of callback method in a threaded client of a distributed .NET application
Author :
I. Kostal
Author_Institution :
Fac. of Economic Inf., Univ. of Econ. in Bratislava, Bratislava, Slovakia
fYear :
2011
fDate :
6/1/2011 12:00:00 AM
Firstpage :
83
Lastpage :
87
Abstract :
If we develop by .NET Remoting a .NET distributed application with a threaded client that has a user interface (UI) for a control of a distributed mechatronics system we have to often solve a problem of the responsiveness of its user interface. In a Windows Forms UI application all the code usually runs on a single thread known as the primary UI thread that is important because it is in charge of maintaining the responsiveness of the user interface. But how does our application respond when an asynchronous method call has finished executing and how do we update the user interface when an asynchronous call is finished? In this case we can take advantage of a handy feature of delegates that let us set up a callback method that is automatically executed by the common language runtime (CLR) when an asynchronous method call is completed. This paper shortly describes setting up a callback method by a delegate type named AsyncCallback that is defined by the Framework Class Library in the System namespace. In a conclusion the paper demonstrates the use of a callback method in the threaded client of sample distributed .NET application that was built in the Microsoft Visual Basic 2008 language and in the Microsoft Visual Studio 2008 development environment. By a callback method this client keeps the responsiveness of its user interface during executing an asynchronous call and updates the user interface when an asynchronous call is finished.
Keywords :
"User interfaces","Message systems","Switches","Instruction sets","Servers","Runtime"
Publisher :
ieee
Conference_Titel :
MECHATRONIKA, 2011 14th International Symposium
Print_ISBN :
978-1-61284-821-1
Type :
conf
DOI :
10.1109/MECHATRON.2011.5961071
Filename :
5961071
Link To Document :
بازگشت