BBjAPI::cloneAsClientObject

Description

In BBj 8.00 and higher, this method creates a clone of a server-side object on the client and returns a ClientObject that is an RMI handle to that client-side Object.

Syntax

Return Value

Method

ClientObject

cloneAsClientObject(ObjectserverObj)

Parameters

Variable

Description

serverObj

A server-side Object.

Return Value

A ClientObject that is an RMI handle to a client-side Object which is a clone of serverObj.

Remarks

The ServerObj must be a serializable Object. ServerObj is serialized through an ObjectOutputStream and the resulting bytes are transported to the client where they are used to create an ObjectInputStream on the client. A new Object is read from the ObjectInputStream. Finally a ClientObject is created on the server that is an RMI handle for this newly created client-side Object. This ClientObject is the return value of the method

An error is thrown if the serverObj is not serializable.

See Also

BBjAPI

ClientObject Tutorial

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.