FunctionPackage: net.rpcToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

export-remote-symbol

Arguments: home-location symbol export-string &optional propagate

This function was changed incompatibly in release 6.2. It now has three rather than 2 required arguments (and two new optional arguments).

This function defines a mapping from symbols that name a class to a string. It returns export-string. home-location must be an instance of rpc-port or of rpc-port-server (its presence allows the generic function to behave differently on the two classes).

A local reference to a class is identified in an outgoing remote reference by a string. The default string is the "~A" representation of the class name. If an export-string is defined for the class, then the export-string is sent instead.

To avoid ambiguities or conflicts caused by package and case differences between remote images, an application can use export-remote-symbol in the sender to define unique class identifier strings and import-remote-class in the receiver to interpret these unique strings.

Method for: (rpc-port-server t t)

This method updates the table stored in the rpc-port-server instance. The table is copied to any new rpc-port instances created from the server. If the propagate argument is non-nil, then all active ports created from this server are updated as well.

Method: (rpc-port t t)

This method updates the table in the specified rpc-port instance. The propagate argument is ignored.

Example

Suppose the string "bar" is not sufficient or appropriate to identify the correct class when arriving from Image A to Image B. For example, there may be symbols pkg1::bar and pkg2::bar in image A, and an unrelated symbol pkg3::bar in image B. Image A can define a unique string that identifies the desired class bar uniquely to image B, for example "bar-from-a".

Then image A would say:

(export-remote-symbol port-to-b 'bar "bar-from-a")
(rcall 'foo (make-instance 'bar))

Image B would say:

(import-remote-class port-to-a 'far-bar "bar-from-a")

and the function foo gets the correct class instance.

See also the example in the description of import-remote-class.

See also rpc.htm for general information on the Remote Procedure Call utility in Allegro CL.


Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version