Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

SetMarshaler – PB Docs 150 – PowerBuilder Library

SetMarshaler – PB Docs 150

IPB_Session interface:

SetMarshaler method

Description

Sets a marshaler that will be used to invoke remote methods
and convert PowerBuilder data formats to the user’s communication
protocol.

Syntax

Argument

Description

obj

An object of type pbproxyObject to
be used as a proxy for a remote object that was created using NewProxyObject

marshaler

A class inherited from IPBX_Marshaler

Return Values

None.

Examples

This example creates a JavaMarshaler class and associates
it with a proxy object:

Usage

The SetMarshaler function associates an
object of type IPBX_Marshaler with a PBProxy object. It
is possible to associate multiple marshaler objects with a single
proxy object. It is also possible to associate one marshaler object
with multiple proxy objects. Neither of these is good coding practice
and should be avoided.

Before calling SetMarshaler, you can call
the IPB_Session GetMarshaler function
to obtain an existing marshaler object associated with a given proxy object,
and then destroy the existing marshaler object before associating
a new marshaler with the proxy.

When a proxy object is destroyed, it calls the associated
marshaler object’s Destroy method. If
multiple proxy objects are associated with a single marshaler object,
you need to implement some form of reference counting. Otherwise,
the marshaler object is destroyed when the first associated proxy object
is destroyed, and subsequent calls to the marshaler object’s Destroy method,
when other associated proxy objects are destroyed, will throw exceptions.

To avoid these issues, there should be a one-to-one relationship
between marshaler and proxy objects.

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x