One embodiment of the present invention provides a system that facilitates
transferring data between system components. During operation, the system
receives a transfer session object at a data sink component through a
universal data transfer interface, wherein the transfer session object
contains mobile code that implements a source-specific data transfer
protocol for communicating with a data source component. Next, the system
retrieves data from the data source component through the transfer
session object. In this way, the data sink component can retrieve data
from the data source component without having to be preconfigured with
the source-specific data transfer protocol for communicating with the
data source component.